[jboss-dev-forums] [Design of Messaging on JBoss (Messaging/JBoss)] - Re: Few XA Questions...

timfox do-not-reply at jboss.com
Thu Mar 19 17:01:47 EDT 2009


"clebert.suconic at jboss.com" wrote : - In what circunstance xaSession.end(xid, XAResource.TMFAIL) would be called?
  | 
  | I have made this simple test. and I would expect a commit call to a failed xaSession throwing an exception:
  | 
  |    public void testFailXID() throws Exception
  |   |    {
  |   |       Xid xid = newXID();
  |   |       ClientSession session = sessionFactory.createSession(true, false, false);
  |   |       session.start(xid, XAResource.TMNOFLAGS);
  |   |       session.end(xid, XAResource.TMFAIL);
  |   |       session.commit(xid, true); // shouldn't this throw an exception?
  |   | 
  |   |       session.close();
  |   | 
  |   |    }
  |   | 
  | 
  | And this is more a question for TM guys:
  | 

I guess strictly we should be throwing an exception from commit since it should be rollback only, however in reality I suppose it would an error in the tx mgr if it called commit after ending with TMFAIL.

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

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



More information about the jboss-dev-forums mailing list