1 25 26 package org.objectweb.jonas_jms; 27 28 import javax.jms.JMSException ; 29 import javax.jms.QueueConnection ; 30 import javax.jms.QueueConnectionFactory ; 31 import javax.jms.XAQueueConnectionFactory ; 32 33 import org.objectweb.util.monolog.api.BasicLevel; 34 35 44 public class JQueueConnectionFactory extends JConnectionFactory implements QueueConnectionFactory { 45 46 private XAQueueConnectionFactory xaqcf; 47 48 52 public JQueueConnectionFactory(String name) { 53 this.name = name; 54 jms = JmsManagerImpl.getJmsManager(); 55 xacf = jms.getXAQueueConnectionFactory(); 56 xaqcf = (XAQueueConnectionFactory ) xacf; 57 } 58 59 63 72 public QueueConnection createQueueConnection() throws JMSException { 73 TraceJms.logger.log(BasicLevel.DEBUG,""); 74 JQueueConnection qc = (JQueueConnection) getJConnection(); 75 if (qc == null) { 76 qc = new JQueueConnection(this, xaqcf); 77 } 78 return (QueueConnection ) qc; 79 } 80 81 94 public QueueConnection createQueueConnection(String userName, String password) throws JMSException { 95 TraceJms.logger.log(BasicLevel.DEBUG,""); 96 JQueueConnection qc = (JQueueConnection) getJConnection(userName); 97 if (qc == null) { 98 qc = new JQueueConnection(this, xaqcf, userName, password); 99 } 100 return (QueueConnection ) qc; 101 } 102 103 104 } 105 | Popular Tags |