org.apache.activemq.web
Class SpringBrokerContextListener

java.lang.Object
  extended by org.apache.activemq.web.SpringBrokerContextListener
All Implemented Interfaces:
EventListener, ServletContextListener

public class SpringBrokerContextListener
extends Object
implements ServletContextListener

Used to configure and instance of ActiveMQ BrokerService using ActiveMQ/Spring's xml configuration.

The configuration file is specified via the context init parameter brokerURI, typically: <context-param> <param-name>brokerURI</param-name> <param-value>/WEB-INF/activemq.xml</param-value> </context-param> As a a default, if a brokerURI is not specified it will look up for activemq.xml


Field Summary
static String INIT_PARAM_BROKER_URI
          broker uri context parameter name: brokerURI
 
Constructor Summary
SpringBrokerContextListener()
           
 
Method Summary
 void contextDestroyed(ServletContextEvent event)
           
 void contextInitialized(ServletContextEvent event)
           
protected  BrokerService createBroker(ServletContext context)
          Factory method to create a new ActiveMQ Broker
protected  BrokerService getBrokerService()
          Return the broker container.
protected  void setBrokerService(BrokerService container)
          Set the broker container to be used by this listener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INIT_PARAM_BROKER_URI

public static final String INIT_PARAM_BROKER_URI
broker uri context parameter name: brokerURI

See Also:
Constant Field Values
Constructor Detail

SpringBrokerContextListener

public SpringBrokerContextListener()
Method Detail

setBrokerService

protected void setBrokerService(BrokerService container)
Set the broker container to be used by this listener

Parameters:
container - the container to be used.

getBrokerService

protected BrokerService getBrokerService()
Return the broker container.


contextInitialized

public void contextInitialized(ServletContextEvent event)
Specified by:
contextInitialized in interface ServletContextListener

contextDestroyed

public void contextDestroyed(ServletContextEvent event)
Specified by:
contextDestroyed in interface ServletContextListener

createBroker

protected BrokerService createBroker(ServletContext context)
Factory method to create a new ActiveMQ Broker



Copyright © 2005-2013 The Apache Software Foundation. All Rights Reserved.