1 Reply Latest reply on Sep 28, 2005 6:43 AM by jmelvin

    commit fails on transacted session in ejb

    jmelvin Newbie

      I'm trying to do some JMS calls in an EJB method. The method is transacted, but I want the jms calls to be transacted separately.
      My code is

      con = lookup("JmsXA");
      Session session = con.createSession(true, Session.SESSION_TRANSACTED);
      //do some stuff

      On commit I get the following error
      Caused by: javax.jms.TransactionInProgressException: Should not be call from a XASession
      at org.jboss.mq.SpySession.commit(SpySession.java:471)
      at org.jboss.resource.adapter.jms.JmsSession.commit(JmsSession.java:236)
      at myejb.myMethod

      I'm creating the session transacted so as far as I am aware I should be able to call commit regardless of there being an existing XA transaction.
      Maybe I shouldn't be using JmsXA? Or is this a JBoss bug?

      Any help greatly appreciated