1 45 package org.exolab.jms.client; 46 47 import java.util.Map ; 48 import javax.jms.JMSException ; 49 import javax.jms.JMSSecurityException ; 50 import javax.jms.XAConnection ; 51 import javax.jms.XAConnectionFactory ; 52 import javax.jms.XAQueueConnection ; 53 import javax.jms.XAQueueConnectionFactory ; 54 import javax.jms.XATopicConnection ; 55 import javax.jms.XATopicConnectionFactory ; 56 57 import org.exolab.jms.common.uuid.UUID; 58 59 60 68 public class JmsXAConnectionFactory 69 extends JmsConnectionFactory 70 implements XAConnectionFactory , XAQueueConnectionFactory , 71 XATopicConnectionFactory { 72 73 76 public JmsXAConnectionFactory() { 77 } 78 79 86 public JmsXAConnectionFactory(String className, Map properties) { 87 this(className, properties, null); 88 } 89 90 98 public JmsXAConnectionFactory(String className, Map properties, 99 Map environment) { 100 super(className, properties, environment); 101 } 102 103 114 public XAConnection createXAConnection() throws JMSException { 115 return createXAConnection(null, null); 116 } 117 118 131 public XAConnection createXAConnection(String userName, String password) 132 throws JMSException { 133 String id = UUID.next(); 134 JmsXAConnection connection = new JmsXAConnection(this, id, userName, 135 password); 136 addConnection(connection); 137 return connection; 138 } 139 140 152 public XAQueueConnection createXAQueueConnection() throws JMSException { 153 return createXAQueueConnection(null, null); 154 } 155 156 170 171 public XAQueueConnection createXAQueueConnection(String userName, 172 String password) 173 throws JMSException { 174 String id = UUID.next(); 175 JmsXAQueueConnection connection = new JmsXAQueueConnection(this, id, 176 userName, 177 password); 178 addConnection(connection); 179 return connection; 180 } 181 182 194 195 public XATopicConnection createXATopicConnection() throws JMSException { 196 return createXATopicConnection(null, null); 197 } 198 199 213 214 public XATopicConnection createXATopicConnection(String userName, 215 String password) 216 throws JMSException { 217 String id = UUID.next(); 218 JmsXATopicConnection connection = new JmsXATopicConnection(this, id, 219 userName, 220 password); 221 addConnection(connection); 222 return connection; 223 } 224 225 } 226 | Popular Tags |