public class MuleXmlBuilderContextListener extends Object implements 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.
SpringXmlConfigurationBuilder
Modifier and Type | Field and Description |
---|---|
static String |
ATTR_JAVAX_SERVLET_CONTEXT_TEMPDIR
Name of the temp dir param as per the servlet spec.
|
static String |
INIT_PARAMETER_MULE_APP_CONFIG |
static String |
INIT_PARAMETER_MULE_CONFIG
One or more Mule config files.
|
protected Log |
logger |
protected MuleContext |
muleContext |
Constructor and Description |
---|
MuleXmlBuilderContextListener() |
Modifier and Type | Method and Description |
---|---|
void |
contextDestroyed(ServletContextEvent event) |
void |
contextInitialized(ServletContextEvent event) |
protected MuleContext |
createMuleContext(String configResource,
ServletContext servletContext)
Creates the MuleContext based on the configuration resource(s) and possibly
init parameters for the Servlet.
|
void |
destroy() |
protected 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(ServletContext context) |
public static final String INIT_PARAMETER_MULE_CONFIG
public static final String INIT_PARAMETER_MULE_APP_CONFIG
public static final String ATTR_JAVAX_SERVLET_CONTEXT_TEMPDIR
protected MuleContext muleContext
protected final transient Log logger
public void contextInitialized(ServletContextEvent event)
contextInitialized
in interface ServletContextListener
public void initialize(ServletContext context)
protected MuleContext createMuleContext(String configResource, ServletContext servletContext) throws ConfigurationException, InitialisationException
protected String getDefaultConfigResource()
public void contextDestroyed(ServletContextEvent event)
contextDestroyed
in interface ServletContextListener
public void destroy()
Copyright © 2003–2016 MuleSoft, Inc.. All rights reserved.