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.admin.AdminModule; 30 31 import java.util.Hashtable ; 32 33 import javax.naming.NamingException ; 34 import javax.naming.Reference ; 35 import javax.naming.StringRefAddr ; 36 37 38 42 public class SoapConnectionFactory extends org.objectweb.joram.client.jms.ConnectionFactory 43 { 44 52 public SoapConnectionFactory(String host, int port, int timeout) { 53 super(host, port); 54 params.cnxPendingTimer = timeout * 1000; 55 } 56 57 60 public SoapConnectionFactory() {} 61 62 63 69 public javax.jms.Connection createConnection(String name, String password) 70 throws javax.jms.JMSException { 71 return new Connection(params, new SoapConnection(params, name, password)); 72 } 73 74 83 public static javax.jms.ConnectionFactory 84 create(String host, int port, int timeout) { 85 return new SoapConnectionFactory(host, port, timeout); 86 } 87 88 97 public static javax.jms.ConnectionFactory create(int timeout) 98 throws java.net.ConnectException { 99 return create(AdminModule.getLocalHost(), 100 AdminModule.getLocalPort(), 101 timeout); 102 } 103 } 104 | Popular Tags |