[jboss-user] [JCA] - HornetQ RA integration

Adrian Brock do-not-reply at jboss.com
Fri Mar 19 10:40:30 EDT 2010


Adrian Brock [http://community.jboss.org/people/adrian%40jboss.org] replied to the discussion

"HornetQ RA integration"

To view the discussion, visit: http://community.jboss.org/message/533031#533031

--------------------------------------------------------------
> Tim Fox wrote:
> 
> Adrian,
> 
> So you're saying it's correct for a JCA impl to call
> 
> getManagedConnection()
> 
> then
> 
> managedConnection.getXAResource()
> 
> and then never enlist the resource in a tx, and expect the managed connection to behave as non transacted?
> 
> I can't see this requirement in the JCA spec anyway, but I will defer to your better knowledge of JCA.
Why do you think that is a correct assumption?

The managed connections are pooled, so you've got no idea whether the connection is enlisted from one check out of the
connection from the pool to the next unless you track it yourself in the ManagedConnection/XAResource calls.

All your assumption does (including your wrapper workaround) is defer the failure to the case when
for the same ManagedConnection it does:

Request1: Is in a tx so use an XAConnection
Request2: Not in a tx - oops still tries to use an XAConnection for non xa stuff.

That is unless you back the ManagedConnection with two real connections/sessions?

Anyway, although not exactly on topic, I remember arguing about this line in the JCA 1.6 spec review
See 7.10.1 Transaction Scenarios Requirements
"
Note that both
LocalTransaction and XATransaction resource adapters support local
transactions. and they are both referred to as “local transaction capable” resource
adapters in the section below.
"
We came to conclusion that this statement (from an older version of the spec) says
that you can deploy a rar declared as XATransaction in local-tx mode at the connection factory level.

But it could also be taken to require the behaviour we are discussing?

--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/533031#533031]

Start a new discussion in JCA at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2098]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20100319/1094dbd3/attachment.html 


More information about the jboss-user mailing list