org.exolab.jms.server
Class EmbeddedJmsServer

java.lang.Object
  |
  +--org.exolab.jms.server.JmsServer
        |
        +--org.exolab.jms.server.EmbeddedJmsServer
All Implemented Interfaces:
java.lang.Runnable

public class EmbeddedJmsServer
extends JmsServer
implements java.lang.Runnable

This class is used to embed the JMS Server in another component, e.g an EJB or Servlet container etc. It implements Runnable and should be instantiated in its own thread. new Thread(new EmbeddedJmsServer("jms_config.xml"))

Version:
$Revision: 1.18 $ $Date: 2004/01/03 04:00:56 $
Author:
Jim Alateras
See Also:
Runnable

Fields inherited from class org.exolab.jms.server.JmsServer
_services
 
Constructor Summary
EmbeddedJmsServer(org.exolab.jms.config.Configuration config)
          Construct a new EmbeddedJmsServer
EmbeddedJmsServer(java.lang.String file)
          Construct a new EmbeddedJmsServer
 
Method Summary
 org.exolab.core.service.ServiceManager getServiceManager()
          Return an instance of the service manager
 void run()
          This method calls the init method on the serverObj_.It assumes that the serverObj, has been correctly initialised, which is the responsibility of the constructor.
 
Methods inherited from class org.exolab.jms.server.JmsServer
createRegistry, init, initConnector, initConnectors, initJNDIConnector, initJNDIConnectors, main, registerServices, usage, version
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EmbeddedJmsServer

public EmbeddedJmsServer(org.exolab.jms.config.Configuration config)
                  throws ServerException
Construct a new EmbeddedJmsServer
Parameters:
config - the server configuration
Throws:
ServerException - if the server cannot be created

EmbeddedJmsServer

public EmbeddedJmsServer(java.lang.String file)
                  throws ServerException
Construct a new EmbeddedJmsServer
Parameters:
file - configuration file name
Throws:
ServerException - if the server cannot be created
Method Detail

run

public void run()
This method calls the init method on the serverObj_.It assumes that the serverObj, has been correctly initialised, which is the responsibility of the constructor. If it fails to initialise the server then it throws FailedToInitialiseServerException exception
Specified by:
run in interface java.lang.Runnable

getServiceManager

public org.exolab.core.service.ServiceManager getServiceManager()
Return an instance of the service manager
Returns:
ServiceManager


Copyright © 1999-2004 The OpenJMS Group. All Rights Reserved.