1 24 package org.objectweb.joram.client.jms.tcp; 25 26 import org.objectweb.joram.client.jms.XAConnection; 27 import org.objectweb.joram.client.jms.admin.AdminModule; 28 29 import java.util.Vector ; 30 31 import javax.naming.NamingException ; 32 33 34 38 public class XATcpConnectionFactory 39 extends org.objectweb.joram.client.jms.XAConnectionFactory 40 { 41 47 public XATcpConnectionFactory(String host, int port) 48 { 49 super(host, port); 50 } 51 52 58 public javax.jms.XAConnection 59 createXAConnection(String name, String password) 60 throws javax.jms.JMSException { 61 return new XAConnection(params, 62 new TcpConnection(params, 63 name, 64 password, 65 reliableClass)); 66 } 67 68 75 public static javax.jms.XAConnectionFactory 76 create(String host, int port) { 77 return create(host, 78 port, 79 "org.objectweb.joram.client.jms.tcp.ReliableTcpClient"); 80 } 81 82 90 public static javax.jms.XAConnectionFactory 91 create(String host, 92 int port, 93 String reliableClass) { 94 XATcpConnectionFactory cf = new XATcpConnectionFactory(host, port); 95 cf.setReliableClass(reliableClass); 96 return cf; 97 } 98 99 105 public static javax.jms.XAConnectionFactory create() 106 throws java.net.ConnectException 107 { 108 return create(AdminModule.getLocalHost(), AdminModule.getLocalPort()); 109 } 110 111 } 112 | Popular Tags |