activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gary Tully (JIRA)" <>
Subject [jira] Commented: (AMQ-2346) in managed environment, 2 connections/session, UserTransaction, transaction management gets confused
Date Mon, 31 Aug 2009 14:42:41 GMT


Gary Tully commented on AMQ-2346:

David, not sure what the best plan of action is here.

I worked through the test case and the problem is that there are two sessions and two XAResources
and only one of those sessions is associated with the active connection so only one of those
sessions will behave as expected when a transaction is rolled back.
The test holds two connections and two XAResources and alternates the commit/rollback between
them. I find that the second iteration of the test always fails.

There is an additional problem in that  the second session/connection has an outstanding transaction
when it is closed, as a result of the outstanding transaction, the close is deferred till
the transaction commits, which never happens, thus we see the problems with "javax.jms.InvalidClientIDException:
Broker: localhost - Client: org.apache.activemq.test.JmsResourceProvider already connected
from vm://localhost#4 on subsequent tests. 

My first though was that these connections should be presenting the same XAResource (somethng
with isSameRM == true), Essentially an XAResoruce for the Broker. But it looks like the intention
is that an XAResource maps to a session. Maybe this is the crux of the problem.

When dealing with the two sessions and XAResources, my thinking was that the test should be
driving 2PC, but this does not work because the broker only sees one transaction branch and
fails on a second prepare.

So I am thinking that the correct solution is to have a shared XAResource for the ResourceAdapter
and have sessions just track the association. Not sure yet what all the ramifications are.
What do you think?

> in managed environment, 2 connections/session, UserTransaction, transaction management
gets confused
> ----------------------------------------------------------------------------------------------------
>                 Key: AMQ-2346
>                 URL:
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: JCA Container
>    Affects Versions: 5.3.0
>            Reporter: David Jencks
>            Assignee: Gary Tully
>             Fix For: 5.3.0
> In geronimo we're seeing an intermittent tck problem that seems to relate to a situation
where there are:
> -- a BMT stateless session ejb
> -- two connections (I think these get shared to the same ManagedConnection)
> -- two sessions
> -- tx control through UT
> -- send a message in one tx
> -- receive message in a tx that is rolled back
> -- receive message in a tx that is committed
> In a public test case I'm seeing that the session proxies get confused about whether
there is an active transaction.  This doesn't happen all the time but with a few repititions
it happens consistently.
> See GERONIMO-4784

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message