1 24 package org.objectweb.joram.client.jms.ha.tcp; 25 26 import org.objectweb.joram.client.jms.XAConnection; 27 import org.objectweb.joram.client.jms.XATopicConnection; 28 import org.objectweb.joram.client.jms.Connection; 29 import org.objectweb.joram.client.jms.TopicConnection; 30 31 import javax.naming.NamingException ; 32 33 37 public class XATopicHATcpConnectionFactory 38 extends org.objectweb.joram.client.jms.XATopicConnectionFactory 39 { 40 41 private String url; 42 43 46 public XATopicHATcpConnectionFactory(String url) 47 { 48 super(url); 49 this.url = url; 50 } 51 52 57 public javax.jms.XATopicConnection 58 createXATopicConnection(String name, String password) 59 throws javax.jms.JMSException 60 { 61 HATcpConnection lc = new HATcpConnection( 62 url, params, name, password, reliableClass); 63 return new XATopicConnection(params, lc); 64 } 65 66 71 public javax.jms.XAConnection 72 createXAConnection(String name, String password) 73 throws javax.jms.JMSException 74 { 75 HATcpConnection lc = new HATcpConnection( 76 url, params, name, password, reliableClass); 77 return new XAConnection(params, lc); 78 } 79 80 85 public javax.jms.TopicConnection 86 createTopicConnection(String name, String password) 87 throws javax.jms.JMSException 88 { 89 HATcpConnection lc = new HATcpConnection( 90 url, params, name, password, reliableClass); 91 return new TopicConnection(params, lc); 92 } 93 94 100 public javax.jms.Connection createConnection(String name, String password) 101 throws javax.jms.JMSException 102 { 103 HATcpConnection lc = new HATcpConnection( 104 url, params, name, password, reliableClass); 105 return new Connection(params, lc); 106 } 107 108 109 113 public static javax.jms.XATopicConnectionFactory create(String url) { 114 return create(url, 115 "org.objectweb.joram.client.jms.tcp.ReliableTcpClient"); 116 } 117 118 122 public static javax.jms.XATopicConnectionFactory 123 create(String url, String reliableClass) { 124 XATopicHATcpConnectionFactory cf = new XATopicHATcpConnectionFactory(url); 125 cf.setReliableClass(reliableClass); 126 return cf; 127 } 128 } 129 | Popular Tags |