Print Thread
ISAPI, TWebModule and TOracleSession
#755 08/10/00 03:55 PM
Joined: Nov 1999
Posts: 8
danmark
P
Member
OP Offline
Member
P
Joined: Nov 1999
Posts: 8
danmark
Does anyone here have experience using DOA for databaseacces in an ISAPI application?

I am having trouble with the multithreaded aspect of the webmodule. I place an TOracleSession in the webmodule at designtime and set it as the session property of my TOracleQueries and TOracleDatasets. Now each http-request spawns a new thread of the application with its own session, but the sessions all have the same name, but of course I need to serve webusers in their own databasesession, right?
Now, with a TSession you would use the AutoSessionName property, but TOracleSession does not not have it.

I see two possible solutions: Either use one multithreaded session global to the WebModule and all webusers. Well, thats not really a solution. Or generate singlethreaded TOracleSessions dynamically with unique names and then set the sessionproperty of queries and do that for each http-request!

Is my understanding of this correct?

from the Delphi manual:
Separate instances of the Web module are generated for each thread at runtime. Each of those modules contains the session object. Each of those sessions must have a separate name, so that the threads that handle separate request messages do not interfere with each other's database connections.

Any workarounds?

TIA
Peter Laursen
You are welcome to answer directly to my emailadr:
ptl@edbgruppen.dk

Re: ISAPI, TWebModule and TOracleSession
#756 08/10/00 06:21 PM
Joined: Aug 1999
Posts: 22,208
Member
Offline
Member
Joined: Aug 1999
Posts: 22,208
The AutoSessionName applies to the SessionName property of a TSession. The Name of each TSession instance in each WebModule instance will be the same. The BDE apparently requires unique SessionName properties for all TSession instances.

A TOracleSession does not have a SessionName property, and does not require an AutoSessionName property. Multiple TOracleSession instances will never interfere with each other, regardless of their Name. Therefore you should not run into any kind of problem with TOracleSession instances in WebModules.

------------------
Marco Kalter
Allround Automations


Marco Kalter
Allround Automations

Moderated by  support 

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.4
(Release build 20200307)
Responsive Width:

PHP: 7.1.33 Page Time: 0.028s Queries: 14 (0.007s) Memory: 2.4985 MB (Peak: 3.0393 MB) Data Comp: Off Server Time: 2024-05-02 16:57:27 UTC
Valid HTML 5 and Valid CSS