1 25 package org.objectweb.joram.client.jms; 26 27 import javax.jms.IllegalStateException ; 28 import javax.jms.JMSException ; 29 30 import org.objectweb.util.monolog.api.BasicLevel; 31 32 import org.objectweb.joram.client.jms.connection.RequestChannel; 33 34 38 public class XAConnection extends Connection 39 implements javax.jms.XAConnection { 40 41 42 private XAResourceMngr rm; 43 44 53 public XAConnection(FactoryParameters factoryParameters, 54 RequestChannel requestChannel) 55 throws JMSException { 56 super(factoryParameters, requestChannel); 57 rm = new XAResourceMngr(this); 58 } 59 60 66 public javax.jms.Session 67 createSession(boolean transacted, int acknowledgeMode) 68 throws JMSException 69 { 70 return super.createSession(transacted, acknowledgeMode); 71 } 72 73 78 public javax.jms.XASession createXASession() throws JMSException 79 { 80 checkClosed(); 81 Session s = new Session(this, true, 0, getRequestMultiplexer()); 82 XASession xas = new XASession(this, s, rm); 83 addSession(s); 84 return xas; 85 } 86 87 91 public XAResourceMngr getXAResourceMngr() { 92 return rm; 93 } 94 } 95 | Popular Tags |