org.mule.config.builders
Class MuleXmlBuilderContextListener
java.lang.Object
org.mule.config.builders.MuleXmlBuilderContextListener
- All Implemented Interfaces:
- java.util.EventListener, javax.servlet.ServletContextListener
public class MuleXmlBuilderContextListener
- extends java.lang.Object
- implements javax.servlet.ServletContextListener
MuleXmlBuilderContextListener
is a bootstrap listener used to
construct a MuleContext
instance. This listener delegates to the
MuleXmlConfigurationBuilder.
The location of the configuration file can be specified in a init parameter called
org.mule.config, the value can be a path on the local file system or on
the classpath. If a config parameter is not specified a default mule-config.xml
will be used.
- See Also:
SpringXmlConfigurationBuilder
Method Summary |
void |
contextDestroyed(javax.servlet.ServletContextEvent event)
|
void |
contextInitialized(javax.servlet.ServletContextEvent event)
|
protected MuleContext |
createMuleContext(java.lang.String configResource,
javax.servlet.ServletContext context)
Creates the MuleContext based on the configuration resource(s) and possibly
init parameters for the Servlet. |
void |
destroy()
|
protected java.lang.String |
getDefaultConfigResource()
If no config location resource is configured on the servlet context, the value
returned from this method will be used to initialise the MuleManager. |
void |
initialize(javax.servlet.ServletContext context)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
INIT_PARAMETER_MULE_CONFIG
public static final java.lang.String INIT_PARAMETER_MULE_CONFIG
- One or more Mule config files.
- See Also:
- Constant Field Values
muleContext
protected MuleContext muleContext
logger
protected final transient Log logger
MuleXmlBuilderContextListener
public MuleXmlBuilderContextListener()
contextInitialized
public void contextInitialized(javax.servlet.ServletContextEvent event)
- Specified by:
contextInitialized
in interface javax.servlet.ServletContextListener
initialize
public void initialize(javax.servlet.ServletContext context)
createMuleContext
protected MuleContext createMuleContext(java.lang.String configResource,
javax.servlet.ServletContext context)
throws ConfigurationException,
InitialisationException
- Creates the MuleContext based on the configuration resource(s) and possibly
init parameters for the Servlet.
- Throws:
ConfigurationException
InitialisationException
getDefaultConfigResource
protected java.lang.String getDefaultConfigResource()
- If no config location resource is configured on the servlet context, the value
returned from this method will be used to initialise the MuleManager.
- Returns:
- the default config resource location
contextDestroyed
public void contextDestroyed(javax.servlet.ServletContextEvent event)
- Specified by:
contextDestroyed
in interface javax.servlet.ServletContextListener
destroy
public void destroy()
Copyright © 2003-2010 MuleSoft, Inc.. All Rights Reserved.