[Design of Messaging on JBoss (Messaging/JBoss)] - XAResource.isSameRM
by clebert.suconic@jboss.com
The following test if failing:
Shouldn't session1.isSameRM(session2) return true, since they refer to the same server?
| public void testIsSameRM() throws Exception
| {
| ClientSession session1 = factory.createSession(true, false, false);
| ClientSession session2 = factory.createSession(true, false, false);
|
| assertTrue(session1.isSameRM(session2));
|
| session1.close();
| session2.close();
| }
|
|
By consequence of that, the following JMS test that I wrote is also failing:
public void testIsSamRM() throws Exception
| {
| XAConnection conn = null;
|
| conn = xacf.createXAConnection();
|
| //Create a session
| XASession sess1 = conn.createXASession();
| XAResource res1 = sess1.getXAResource();
|
| //Create a session
| XASession sess2 = conn.createXASession();
| XAResource res2 = sess2.getXAResource();
|
|
| assertTrue(res1.isSameRM(res2));
|
| }
|
So, isSameRM is basically aways returning false, unless you compare res1 against itself..
BTW: (This failing test was actually the reason I was having a hard time understanding why JOIN was not being called).
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4217072#4217072
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4217072
17 years
[Design of Messaging on JBoss (Messaging/JBoss)] - XA-related failures in JMS bridge reconnection tests
by jmesnil
I've ported the JMS Bridge tests to our integration tests (using 2 invm servers instead of spawned ones).
Most tests pass but there are failures related to XA (QoS once-and-only-once + separate servers for the source and target queues).
I've not touched that much the bridge code or the bridge tests so it's likely a regression we have on the trunk wrt XA.
I'm still investigating the issue but a commented instruction caught my attention in BridgeImpl.setupJMSObjects():
| if (forwardMode == FORWARD_MODE_XA && sourceSession instanceof JBossSession)
| {
| JBossSession jsession = (JBossSession)sourceSession;
|
| ClientSession clientSession = jsession.getCoreSession();
|
| //clientSession.setTreatAsNonTransactedWhenNotEnlisted(false);
| }
|
this setTreatAsNonTransactedWhenNotEnlisted flag is no longer present in JBM trunk but I wonder if it rings any bell for people who worked on JBM 1.4 (it seems mostly related to JBMESSAGING-946)?
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4217063#4217063
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4217063
17 years