1 25 package org.objectweb.joram.client.jms.soap; 26 27 import org.objectweb.joram.client.jms.Connection; 28 import org.objectweb.joram.client.jms.FactoryParameters; 29 import org.objectweb.joram.client.jms.TopicConnection; 30 import org.objectweb.joram.client.jms.admin.AdminModule; 31 32 import java.util.Vector ; 33 34 import javax.naming.NamingException ; 35 import javax.naming.Reference ; 36 import javax.naming.StringRefAddr ; 37 38 39 43 public class TopicSoapConnectionFactory 44 extends org.objectweb.joram.client.jms.TopicConnectionFactory 45 { 46 54 public TopicSoapConnectionFactory(String host, int port, int timeout) 55 { 56 super(host, port); 57 params.cnxPendingTimer = timeout * 1000; 58 } 59 60 63 public TopicSoapConnectionFactory() 64 {} 65 66 67 73 public javax.jms.TopicConnection 74 createTopicConnection(String name, String password) 75 throws javax.jms.JMSException 76 { 77 return new TopicConnection(params, 78 new SoapConnection(params, name, password)); 79 } 80 81 87 public javax.jms.Connection createConnection(String name, String password) 88 throws javax.jms.JMSException 89 { 90 return new Connection(params, new SoapConnection(params, name, password)); 91 } 92 93 102 public static javax.jms.TopicConnectionFactory 103 create(String host, int port, int timeout) 104 { 105 return new TopicSoapConnectionFactory(host, port, timeout); 106 } 107 108 117 public static javax.jms.TopicConnectionFactory create(int timeout) 118 throws java.net.ConnectException 119 { 120 return create(AdminModule.getLocalHost(), 121 AdminModule.getLocalPort(), 122 timeout); 123 } 124 } 125 | Popular Tags |