1 25 package org.objectweb.joram.client.jms.tcp; 26 27 import org.objectweb.joram.client.jms.XAConnection; 28 import org.objectweb.joram.client.jms.XAQueueConnection; 29 import org.objectweb.joram.client.jms.Connection; 30 import org.objectweb.joram.client.jms.QueueConnection; 31 import org.objectweb.joram.client.jms.admin.AdminModule; 32 33 import java.util.Vector ; 34 35 import javax.naming.NamingException ; 36 37 38 42 public class XAQueueTcpConnectionFactory 43 extends org.objectweb.joram.client.jms.XAQueueConnectionFactory 44 { 45 51 public XAQueueTcpConnectionFactory(String host, int port) 52 { 53 super(host, port); 54 } 55 56 57 63 public javax.jms.XAQueueConnection 64 createXAQueueConnection(String name, String password) 65 throws javax.jms.JMSException { 66 return new XAQueueConnection(params, 67 new TcpConnection(params, 68 name, 69 password, 70 reliableClass)); 71 } 72 73 79 public javax.jms.XAConnection 80 createXAConnection(String name, String password) 81 throws javax.jms.JMSException { 82 return new XAConnection(params, 83 new TcpConnection(params, 84 name, 85 password, 86 reliableClass)); 87 } 88 89 95 public javax.jms.QueueConnection 96 createQueueConnection(String name, String password) 97 throws javax.jms.JMSException { 98 return new QueueConnection(params, 99 new TcpConnection(params, 100 name, 101 password, 102 reliableClass)); 103 } 104 105 111 public javax.jms.Connection createConnection(String name, String password) 112 throws javax.jms.JMSException { 113 return new Connection(params, 114 new TcpConnection(params, 115 name, 116 password, 117 reliableClass)); 118 } 119 120 127 public static javax.jms.XAQueueConnectionFactory 128 create(String host, int port) { 129 return create(host, 130 port, 131 "org.objectweb.joram.client.jms.tcp.ReliableTcpClient"); 132 } 133 134 142 public static javax.jms.XAQueueConnectionFactory 143 create(String host, 144 int port, 145 String reliableClass) { 146 XAQueueTcpConnectionFactory cf = new XAQueueTcpConnectionFactory(host, port); 147 cf.setReliableClass(reliableClass); 148 return cf; 149 } 150 151 157 public static javax.jms.XAQueueConnectionFactory create() 158 throws java.net.ConnectException 159 { 160 return create(AdminModule.getLocalHost(), AdminModule.getLocalPort()); 161 } 162 163 } 164 | Popular Tags |