00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 package org.objectweb.jonas_jms;
00027
00028 import javax.jms.JMSException;
00029 import javax.jms.QueueConnection;
00030 import javax.jms.QueueConnectionFactory;
00031 import javax.jms.XAQueueConnectionFactory;
00032
00033 import org.objectweb.util.monolog.api.BasicLevel;
00034
00044 public class JQueueConnectionFactory extends JConnectionFactory implements QueueConnectionFactory {
00045
00046 private XAQueueConnectionFactory xaqcf;
00047
00052 public JQueueConnectionFactory(String name) {
00053 this.name = name;
00054 jms = JmsManagerImpl.getJmsManager();
00055 xacf = jms.getXAQueueConnectionFactory();
00056 xaqcf = (XAQueueConnectionFactory) xacf;
00057 }
00058
00059
00060
00061
00062
00072 public QueueConnection createQueueConnection() throws JMSException {
00073 TraceJms.logger.log(BasicLevel.DEBUG,"");
00074 JQueueConnection qc = (JQueueConnection) getJConnection();
00075 if (qc == null) {
00076 qc = new JQueueConnection(this, xaqcf);
00077 }
00078 return (QueueConnection) qc;
00079 }
00080
00094 public QueueConnection createQueueConnection(String userName, String password) throws JMSException {
00095 TraceJms.logger.log(BasicLevel.DEBUG,"");
00096 JQueueConnection qc = (JQueueConnection) getJConnection(userName);
00097 if (qc == null) {
00098 qc = new JQueueConnection(this, xaqcf, userName, password);
00099 }
00100 return (QueueConnection) qc;
00101 }
00102
00103
00104 }