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 |
| 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 |
RmiJmsServer
public RmiJmsServer(int port)
throws java.rmi.RemoteException
RmiJmsServer
public RmiJmsServer()
throws java.rmi.RemoteException
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.