org.apache.commons.messagelet
Class ManagerServlet

java.lang.Object
  extended byjavax.servlet.GenericServlet
      extended byorg.apache.commons.messagelet.ManagerServlet
All Implemented Interfaces:
java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class ManagerServlet
extends javax.servlet.GenericServlet

ManagerServlet manages the initialisation and destruction of the Messenger connections and use of MessageListener beans for a given ServletContext.

Version:
$Revision: 1.15 $
Author:
James Strachan
See Also:
Serialized Form

Field Summary
private  boolean continueOnSubscribeException
          Whether exceptions occurring during subscriptions on startup should terminate the initialization
private static java.lang.String KEY_CONNECTIONS
           
private static java.lang.String KEY_SUBSCRIPTIONS
           
private static boolean USE_HTTP_SERVLETS
          Should HTTP servlets be used or generic servlets.
 
Fields inherited from class javax.servlet.GenericServlet
 
Constructor Summary
ManagerServlet()
           
 
Method Summary
protected  MessengerManager createMessengerManager()
           
protected  SubscriptionList createSubscriptionList()
           
 void destroy()
           
 SubscriptionManager getSubscriptionManager()
           
protected  java.lang.String getURLResource(java.lang.String key, java.lang.String description)
           
protected  void handleJMSException(java.lang.String message, javax.jms.JMSException exception)
          Allows derived servlets to handle JMS exceptions differently, such as ignoring certain kinds of exceptions or performing custom logging etc.
 void init()
           
 boolean isContinueOnSubscriptionException()
           
 void service(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response)
           
 void setContinueOnSubscribeException(boolean continueOnSubscribeException)
          Sets whether exceptions occurring during subscriptions on startup should terminate the initialization
 
Methods inherited from class javax.servlet.GenericServlet
getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

USE_HTTP_SERVLETS

private static final boolean USE_HTTP_SERVLETS
Should HTTP servlets be used or generic servlets. If true then JSP can be dispatched to easily

See Also:
Constant Field Values

KEY_CONNECTIONS

private static final java.lang.String KEY_CONNECTIONS
See Also:
Constant Field Values

KEY_SUBSCRIPTIONS

private static final java.lang.String KEY_SUBSCRIPTIONS
See Also:
Constant Field Values

continueOnSubscribeException

private boolean continueOnSubscribeException
Whether exceptions occurring during subscriptions on startup should terminate the initialization

Constructor Detail

ManagerServlet

public ManagerServlet()
Method Detail

getSubscriptionManager

public SubscriptionManager getSubscriptionManager()

init

public void init()
          throws javax.servlet.ServletException
Throws:
javax.servlet.ServletException

destroy

public void destroy()

service

public void service(javax.servlet.ServletRequest request,
                    javax.servlet.ServletResponse response)
             throws javax.servlet.ServletException
Throws:
javax.servlet.ServletException

isContinueOnSubscriptionException

public boolean isContinueOnSubscriptionException()

setContinueOnSubscribeException

public void setContinueOnSubscribeException(boolean continueOnSubscribeException)
Sets whether exceptions occurring during subscriptions on startup should terminate the initialization


createMessengerManager

protected MessengerManager createMessengerManager()
                                           throws javax.servlet.ServletException
Throws:
javax.servlet.ServletException

createSubscriptionList

protected SubscriptionList createSubscriptionList()
                                           throws javax.servlet.ServletException
Throws:
javax.servlet.ServletException

getURLResource

protected java.lang.String getURLResource(java.lang.String key,
                                          java.lang.String description)
                                   throws javax.servlet.ServletException
Throws:
javax.servlet.ServletException

handleJMSException

protected void handleJMSException(java.lang.String message,
                                  javax.jms.JMSException exception)
                           throws javax.servlet.ServletException
Allows derived servlets to handle JMS exceptions differently, such as ignoring certain kinds of exceptions or performing custom logging etc.

Throws:
javax.servlet.ServletException