1 24 package org.objectweb.joram.client.jms; 25 26 import javax.jms.IllegalStateException ; 27 import javax.jms.JMSException ; 28 29 import org.objectweb.joram.client.jms.connection.RequestChannel; 30 31 34 public class XAQueueConnection extends QueueConnection 35 implements javax.jms.XAQueueConnection { 36 37 38 private XAResourceMngr rm; 39 40 49 public XAQueueConnection(FactoryParameters factoryParameters, 50 RequestChannel requestChannel) throws JMSException 51 { 52 super(factoryParameters, requestChannel); 53 rm = new XAResourceMngr(this); 54 } 55 56 62 public javax.jms.QueueSession 63 createQueueSession(boolean transacted, int acknowledgeMode) 64 throws JMSException { 65 return super.createQueueSession(transacted, acknowledgeMode); 66 } 67 68 73 public javax.jms.XAQueueSession createXAQueueSession() throws JMSException 74 { 75 checkClosed(); 76 QueueSession s = new QueueSession(this, true, 0, getRequestMultiplexer()); 77 XAQueueSession xas = new XAQueueSession(this, s, rm); 78 addSession(s); 79 return xas; 80 } 81 82 88 public javax.jms.Session 89 createSession(boolean transacted, int acknowledgeMode) 90 throws JMSException 91 { 92 return super.createSession(transacted, acknowledgeMode); 93 } 94 95 100 public javax.jms.XASession createXASession() throws JMSException 101 { 102 checkClosed(); 103 Session s = new Session(this, true, 0, getRequestMultiplexer()); 104 XASession xas = new XASession(this, s, rm); 105 addSession(s); 106 return xas; 107 } 108 109 113 public XAResourceMngr getXAResourceMngr() { 114 return rm; 115 } 116 } 117 | Popular Tags |