Hi
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
session.commit;
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
The J2EE docs say you cannot use local jms transactions in and ejb, so JBoss is working correctly