jrun.jms.core.server.rmi
Class RmiJmsServer

java.lang.Object
  |
  +--java.rmi.server.RemoteObject
        |
        +--java.rmi.server.RemoteServer
              |
              +--java.rmi.server.UnicastRemoteObject
                    |
                    +--jrun.jms.core.server.rmi.RmiJmsServer
All Implemented Interfaces:
JmsServerIfc, java.rmi.Remote, RemoteJmsServerIfc, java.io.Serializable

public class RmiJmsServer
extends java.rmi.server.UnicastRemoteObject
implements JmsServerIfc, RemoteJmsServerIfc

This class implements the JmsServerIfc and provides an RMI-based transport support. When then client calls init control is passed to this class instance until the server terminates (normally or abnormally).

Version:
$Revision: 1.12 $ $Date: 2001/06/15 03:29:35 $ created by Jim Alateras
See Also:
ConfigurationManager, Serialized Form

Fields inherited from class java.rmi.server.RemoteObject
ref
 
Fields inherited from interface jrun.jms.core.server.JmsServerIfc
Name
 
Constructor Summary
RmiJmsServer()
           
RmiJmsServer(int port)
           
 
Method Summary
 void bindConnectionFactories(javax.naming.Context context)
          Bind any factory object specified in the jms configuration file to the specified JNDI context.
 RemoteJmsServerConnectionIfc createConnection(java.lang.String id)
          Create an anonymus connection to the specified server.
 RemoteJmsServerConnectionIfc createConnection(java.lang.String id, java.lang.String user, java.lang.String password)
          Create a connection to the specified server.
protected  Logger getLogger()
          Return a reference to the logger
 void init()
          This routine binds this service with the jndi, before existing.
 
Methods inherited from class java.rmi.server.UnicastRemoteObject
clone, exportObject, exportObject, exportObject, unexportObject
 
Methods inherited from class java.rmi.server.RemoteServer
getClientHost, getLog, setLog
 
Methods inherited from class java.rmi.server.RemoteObject
equals, getRef, hashCode, toString, toStub
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RmiJmsServer

public RmiJmsServer(int port)
             throws java.rmi.RemoteException

RmiJmsServer

public RmiJmsServer()
             throws java.rmi.RemoteException
Method Detail

init

public void init()
          throws FailedToInitialiseServerException
This routine binds this service with the jndi, before existing. When a client needs to use the server it will be automatically activated to handle the request(s). It does expect that the registry is active when this routine is called.

It throws FailedToInitialiseServerException exception it cannot start the service.

Specified by:
init in interface JmsServerIfc
Throws:
FailedToInitialiseServerException -  

createConnection

public RemoteJmsServerConnectionIfc createConnection(java.lang.String id,
                                                     java.lang.String user,
                                                     java.lang.String password)
                                              throws javax.jms.JMSException,
                                                     java.rmi.RemoteException
Create a connection to the specified server. This will create an instance of a JmsServerConnection and then return a remote reference to it.
Specified by:
createConnection in interface RemoteJmsServerIfc
Parameters:
id - client identity
Returns:
RemoteJmsServerConnectionIfc
Throws:
JMSException -  
java.rmi.RemoteException -  

createConnection

public RemoteJmsServerConnectionIfc createConnection(java.lang.String id)
                                              throws javax.jms.JMSException,
                                                     java.rmi.RemoteException
Create an anonymus connection to the specified server. This will create an instance of a JmsServerConnection and then return a remote reference to it.
Specified by:
createConnection in interface RemoteJmsServerIfc
Parameters:
id - client identity
Returns:
RemoteJmsServerConnectionIfc
Throws:
JMSException -  
java.rmi.RemoteException -  

bindConnectionFactories

public void bindConnectionFactories(javax.naming.Context context)
                             throws FailedToBindFactoriesException
Bind any factory object specified in the jms configuration file to the specified JNDI context. If there is any error during the process then simply log the error and continue. A failure to bind will not terminate the server. used to bind default Topic and Queue connection factories for different transports for internal jms server use

If it cannot bind the connection factories then an exception is thrown.

Specified by:
bindConnectionFactories in interface JmsServerIfc
Parameters:
context - context to bind factory objects
Throws:
FailedToBindFactoriesException -  

getLogger

protected Logger getLogger()
Return a reference to the logger
Returns:
LoggerIfc


Copyright � 2002 Macromedia Corporation. All Rights Reserved.