Subject RE: [IBO] RE: IBO and threads
Author IBO Support List
ConnectionPooling was intended for use in such a situation as you describe but it is by no means any kind of a substitute for you keeping track of your own module instances for use in a muti-threaded service application. For that I have written my own type of system that can be seen in the source\web\server folder of IBO 5.
 
Jason


From: IBObjects@yahoogroups.com [mailto:IBObjects@yahoogroups.com] On Behalf Of danymarmur@...
Sent: Friday, September 13, 2013 7:06 AM
To: IBObjects@yahoogroups.com
Subject: [IBO] RE: IBO and threads

I usually do it like that or have a complete DataModule instantiated instead. The DataModule would have all creation and destructions stuff in it and some public procedure to actually do work.


I use one DataModule per "task" and see to it that stuff like "webuser" and "id's" are parameters so that i can pool instances of the same DataModule class. Then, depending on what's being done, the quieries/procedures might just have to be refreshed/re-executed (plus transactions commited/rolled back of course).


A timer then sees to it to access (unlock) datamodule instances from the pool after a certain time of inactivity and disconnect them from the server. That way the DB will keep all transaction counters nice and tight.


My question now is about the connection pooling in IBO. Was it intended to be used like above? I would have expected the pooling to be "session-pooling" instead. Any pointers as how and if i can use the IBO pooling in some way instead of my own would be appreciated!


Thanks!


/Dany



--- In ibobjects@yahoogroups.com, <supportlist@...> wrote:

I confirm that this looks like a good way to go.
You need some exception handling added in there, but I suppose you realize that.
 
Jason
 


From: IBObjects@yahoogroups.com [mailto:IBObjects@yahoogroups.com] On Behalf Of soerensoerensen@...
Sent: Thursday, September 12, 2013 3:26 AM
To: IBObjects@yahoogroups.com
Subject: RE: Re: [IBO] IBO and threads

 Thank you Rob I was Down the same road but was sure if it was the proper way to do it.