On 2 Aug 00, at 14:08, Carlos Pita wrote:

> > much you can do to work around this.  There is no way you can tell a
> > Connection which Xid or Transaction it should be associated with - there's
> > a one-to-one mapping.  We planned to set it up so that if you're using the
> > wrapper, you can only get one connection for any particular Xid.
> > The problem with this is that the desired result isn't clear: you
> > can either return the same connection object for every request, or throw
> > an exception for all requests after the first.  In the first case, it's
> > not clear how to handle closing (does the connection close after the first
> > or last close call?).  In the second case, you may be prevented from doing
> > some legitimate things (using one table in two beans, and you can't really
> > pass the connection from one to the other).
> 
> I think the first choice is the right one. The second approach is too much
> restrictive and less transparent for the application. You should return the
> connection to the pool after the first close that is outside of any
> transaction.

Hi Carlos,

Just a quick thought. I think you should remember that the client 
"closed" it, and then return it when the transaction completes.

-Dan

Reply via email to