Been reading JTA...

Rickard �berg wrote:
> > 3) XAResource is associated with connection
> 
> Through XAResource.start(), yes.
> 
> > 4) XAResource is registered with TransactionManager (seems to be via
> > Transaction.enlistResource)
> 
> Yup.
> 
> > 5) TransactionManager calls start(...) on XAResource (not my problem)
> 
> As in 3, although I think this *is* your problem. When a bean does
> "getConnection" you do start() and when it does "close()" you do end().

Forget this. You do enlistResource on Tx and it should so start/end
properly.

> IMHO the connection *should* be placed in pool after you call end() on
> it. 

Pool calls delistResource, which in turn calls end(). end() is not
called by pool directly.

> >         I'm really unsure about point #8.  If the bean calls close() on
> > the connection, the JTA spec (3.4.2) seems to indicate that the connection
> > should be dissociated from the transaction, without ending the transaction
> > (does that imply a commit or rollback?
> 
> ending tx -> commit or rollback, yes. Disassociation is done through
> "end()" call on XAResource.

.. by TM..

/Rickard

-- 
Rickard �berg

@home: +46 13 177937
Email: [EMAIL PROTECTED]
http://www.telkel.com
http://www.jboss.org
http://www.dreambean.com

Reply via email to