[jboss-user] [JCA/JBoss] - Re: Pools and permits

adrian@jboss.org do-not-reply at jboss.com
Fri Jan 25 09:02:27 EST 2008


"ydzsidemiik" wrote : For a <tx-connection-factory> with <xa-transaction/> but without <track-connection-by-tx/>, does obtaining a connection handle within an application component acquire an exclusive lock on the underlying managed connection?
  | 

It does while you have the handle open. Although some other part of your application
can open a new handle to the underlying connection in the same transaction,
so it is not quite (but nearly) correct to say it is exclusive to the handle.

anonymous wrote : 
  | Is it possible to have multiple concurrent transactions all holding open handles to the same managed connection with transaction interleaving facilitating the context switching between them?

No. But the connection can be shared for the 2PC protocol.

That is what interleaving means. The real connection (really its XAResource) 
can only be enlisted - XAResource.start() - in one transaction at once, 
but the prepare/commit() doesn't require the connection to be enlisted.

e.g. Oracle XA doesn't allow true interleaving. You can't concurrently commit
two "interleaved" transactions on the same connection (you can
sequentially - but that isn't much use in a multi-threaded environment like JBoss :-)

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4123474#4123474

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4123474



More information about the jboss-user mailing list