Share one TOracleSession between Multiple EXEs

CraigJ

Member²
Is it possible for two or more applications (EXEs) to share the same TOracleSession in a DLL? The more I think about this the more I think it would be impossible so difficult that it would not be worth the effort. Any ideas?

Craig Jensen
craig.jensen@powerquest.com
 
A session that is allocated in a DLL is still local to the process that has initialized the DLL. Any subsequent processes that use the same DLL merely share the code, not the data. To share a physical database session between multiple processes, you probably need to use a 3-tier technique. The middle tier will own the session, and can reside on the same machine as the client tier.

------------------
Marco Kalter
Allround Automations
 
Originally posted by mkalter:
A session that is allocated in a DLL is still local to the process that has initialized the DLL. Any subsequent processes that use the same DLL merely share the code, not the data. To share a physical database session between multiple processes, you probably need to use a 3-tier technique. The middle tier will own the session, and can reside on the same machine as the client tier.


Can you send me an example how to approach it because I stuck in the same situation try to share one oraclesession with multiple Delphi exe under WinNT 4.0.
My email address: bchau@rocketmail.com
Thanks
 
Check out the 3-tier demo. In your case you must make sure that the remote data module is single threaded, so that you will actually share exactly 1 physical database session among different executables.

------------------
Marco Kalter
Allround Automations
 
Back
Top