Class OrderlyCallsWebDeployer

  extended by com.orderlysoftware.orderlycalls.OrderlyCallsWebDeployer
All Implemented Interfaces:
java.util.EventListener, javax.servlet.ServletContextListener

public class OrderlyCallsWebDeployer
extends java.lang.Object
implements javax.servlet.ServletContextListener

Use this class to ensure services are available inside servlet containers, such as Tomcat.

If you need to use OrderlyCalls from multiple contexts, you should only attach the deployer to one of them. The other contexts will be able to access OrderlyCalls whenever this master context is running.

The supplied orderlycalls.war will provide such a master context for you.

Matt King, M.A. Oxon.

Constructor Summary
Method Summary
 void contextDestroyed(javax.servlet.ServletContextEvent sce)
          Called by Tomcat when the current ServletContext is destroyed.
 void contextInitialized(javax.servlet.ServletContextEvent sce)
          Called by Tomcat when your context is started.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public OrderlyCallsWebDeployer()
Method Detail


public void contextInitialized(javax.servlet.ServletContextEvent sce)
Called by Tomcat when your context is started.

The method will read a configuration file and start the specified services automatically.

The method looks for the following parameters within the ServletContextEvent

Whether or not to reuse services from a previous context initialisation. Set to false for development/debug, true for live systems.

The path to the OrderlyCalls configuration file. Typically, this is "WEB-INF/conf/OrderlyCalls.xml".

Specified by:
contextInitialized in interface javax.servlet.ServletContextListener


public void contextDestroyed(javax.servlet.ServletContextEvent sce)
Called by Tomcat when the current ServletContext is destroyed.

Causes the services to be shut down if the context was started with OrderlyCallsReuseServices=false.

Specified by:
contextDestroyed in interface javax.servlet.ServletContextListener
See Also: