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.XAQueueConnection; 28 import org.objectweb.joram.client.jms.Connection; 29 import org.objectweb.joram.client.jms.QueueConnection; 30 31 import javax.naming.NamingException ; 32 33 37 public class XAQueueHATcpConnectionFactory 38 extends org.objectweb.joram.client.jms.XAQueueConnectionFactory 39 { 40 41 private String url; 42 43 46 public XAQueueHATcpConnectionFactory(String url) 47 { 48 super(url); 49 this.url = url; 50 } 51 52 57 public javax.jms.XAQueueConnection 58 createXAQueueConnection(String name, String password) 59 throws javax.jms.JMSException 60 { 61 HATcpConnection lc = new HATcpConnection( 62 url, params, name, password, reliableClass); 63 return new XAQueueConnection(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.QueueConnection 86 createQueueConnection(String name, String password) 87 throws javax.jms.JMSException 88 { 89 HATcpConnection lc = new HATcpConnection( 90 url, params, name, password, reliableClass); 91 return new QueueConnection(params, lc); 92 } 93 94 99 public javax.jms.Connection createConnection(String name, String password) 100 throws javax.jms.JMSException 101 { 102 HATcpConnection lc = new HATcpConnection( 103 url, params, name, password, reliableClass); 104 return new Connection(params, lc); 105 } 106 107 108 112 public static javax.jms.XAQueueConnectionFactory create(String url) { 113 return create(url, 114 "org.objectweb.joram.client.jms.tcp.ReliableTcpClient"); 115 } 116 117 121 public static javax.jms.XAQueueConnectionFactory 122 create(String url, String reliableClass) { 123 XAQueueHATcpConnectionFactory cf = new XAQueueHATcpConnectionFactory(url); 124 cf.setReliableClass(reliableClass); 125 return cf; 126 } 127 } 128 | Popular Tags |