On Fri, Sep 28, 2001 at 07:47:24PM +0200, Ole Husgaard wrote: > Hi, > > Toby Allsopp wrote: > > On Thu, Sep 27, 2001 at 01:59:53PM -0400, David Jencks wrote: > > > on the other hand... the gc is specifically intended to remove connections > > > that have been in use "too long", no matter what their state is - even in a > > > transaction. I certainly have some doubts about the wisdom of this... but > > > don't have a better solution. > > > > The better solution is for the container to know what connections > > are involved in each transaction and to return them to the pool > > when the transaction finishes (e.g. by timing out). I've been > > meaning to implement this for ages but haven't gotten around to > > it. > > > > The logic required for this would also allow things like holding > > onto a connection handle across multiple transactions and having > > it all work properly. > > Makes sense. But maybe it would be better if the container > keeps track of which resource connections are open from > which bean implementation instances. Using that approach, > the container can close/release open resource connections > on behalf of the bean implementation instance when the > bean instance throws an unexpected exception, like a NPE. > This way the container can also associate/disassociate > the resource's transaction when a CMT bean starts and > ends transactions while having resource connections open.
Yes, you're right. The association is between bean instance and connection and is used by the container on transaction boundaries (through a transaction synchronisation) and on other life-cycle events. I wish I had time to implement this. Toby. _______________________________________________ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
