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 XATopicConnection extends TopicConnection 35 implements javax.jms.XATopicConnection { 36 37 38 private XAResourceMngr rm; 39 40 49 public XATopicConnection(FactoryParameters factoryParameters, 50 RequestChannel requestChannel) throws JMSException 51 { 52 super(factoryParameters, requestChannel); 53 rm = new XAResourceMngr(this); 54 } 55 56 62 public javax.jms.TopicSession 63 createTopicSession(boolean transacted, int acknowledgeMode) 64 throws JMSException { 65 return super.createTopicSession(transacted, acknowledgeMode); 66 } 67 68 73 public javax.jms.XATopicSession createXATopicSession() throws JMSException 74 { 75 checkClosed(); 76 TopicSession s = new TopicSession(this, true, 0, getRequestMultiplexer()); 77 XATopicSession xas = new XATopicSession(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 return super.createSession(transacted, acknowledgeMode); 92 } 93 94 99 public javax.jms.XASession createXASession() throws JMSException 100 { 101 checkClosed(); 102 Session s = new Session(this, true, 0, getRequestMultiplexer()); 103 XASession xas = new XASession(this, s, rm); 104 addSession(s); 105 return xas; 106 } 107 108 112 public XAResourceMngr getXAResourceMngr() { 113 return rm; 114 } 115 } 116 | Popular Tags |