[jboss-dev-forums] [Design of Messaging on JBoss (Messaging/JBoss)] - XAResource.isSameRM
clebert.suconic@jboss.com
do-not-reply at jboss.com
Wed Mar 11 13:00:24 EDT 2009
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
More information about the jboss-dev-forums
mailing list