1 45 package org.exolab.jms.server.net; 46 47 import java.rmi.RemoteException ; 48 import javax.jms.InvalidClientIDException ; 49 import javax.jms.JMSException ; 50 import javax.jms.JMSSecurityException ; 51 52 import org.exolab.jms.net.orb.ORB; 53 import org.exolab.jms.net.orb.UnicastObject; 54 import org.exolab.jms.server.ServerConnection; 55 import org.exolab.jms.server.ServerConnectionFactory; 56 import org.exolab.jms.server.JmsServerConnectionManager; 57 58 59 66 class RemoteServerConnectionFactory 67 extends UnicastObject 68 implements ServerConnectionFactory { 69 70 77 public RemoteServerConnectionFactory(ORB orb, String uri) 78 throws RemoteException { 79 super(orb, uri); 80 } 81 82 104 public ServerConnection createConnection(String clientID, String userName, 105 String password) 106 throws JMSException { 107 ServerConnection connection = 108 JmsServerConnectionManager.instance().createConnection( 109 clientID, userName, password); 110 111 RemoteServerConnection remote = null; 112 try { 113 remote = new RemoteServerConnection(connection, getORB()); 114 } catch (RemoteException exception) { 115 throw new JMSException (exception.getMessage()); 116 } 117 return (ServerConnection) remote.getProxy(); 118 } 119 120 } 121 | Popular Tags |