public class TomcatModuleLoader
extends org.apache.catalina.loader.WebappLoader
<Context path='/context-path'> <Loader className='org.diet4j.tomcat.TomcatModuleLoader' rootmodule='com.example.mywebapp' moduledirectory='/usr/share/java' /> </Context>where
com.example.mywebapp
is the the name of the root module for this app,
and moduledirectory
is the directory where JARs of Modules can be found.Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_MODULEDIRECTORY
The default directory in which the module JARs can be found.
|
protected String |
theModuledirectory
Directory in which the module JARs can be found.
|
protected ModuleRegistry |
theModuleRegistry
Keep a reference to the ModuleRegistries that we are using so they won't be garbage collected.
|
protected String |
theRootmodule
Name of the root module.
|
static String[] |
TOMCAT_DO_NOT_LOAD_CLASS_PREFIXES
Tomcat bundles certain libraries, so it needs a different set of class name prefixes
not to load via diet4j.
|
AFTER_DESTROY_EVENT, AFTER_INIT_EVENT, AFTER_START_EVENT, AFTER_STOP_EVENT, BEFORE_DESTROY_EVENT, BEFORE_INIT_EVENT, BEFORE_START_EVENT, BEFORE_STOP_EVENT, CONFIGURE_START_EVENT, CONFIGURE_STOP_EVENT, PERIODIC_EVENT, START_EVENT, STOP_EVENT
Constructor and Description |
---|
TomcatModuleLoader()
Public constructor.
|
TomcatModuleLoader(ClassLoader parent)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
String |
getModuledirectory()
Get directory in which the module JARs can be found.
|
String |
getRootmodule()
Get name of root module.
|
void |
setModuledirectory(String newValue)
Set directory in which the module JARs can be found.
|
void |
setRootmodule(String newValue)
Set name of root module.
|
void |
startInternal()
Start it.
|
void |
stopInternal()
Stop it.
|
String |
toString()
Convert to String, for debugging.
|
addPropertyChangeListener, backgroundProcess, getClassLoader, getClasspath, getContext, getDelegate, getDomainInternal, getLoaderClass, getLoaderRepositories, getLoaderRepositoriesString, getObjectNameKeyProperties, getReloadable, modified, propertyChange, removePropertyChangeListener, setContext, setDelegate, setLoaderClass, setReloadable
destroyInternal, getDomain, getObjectName, initInternal, postDeregister, postRegister, preDeregister, preRegister, register, setDomain, unregister
protected String theRootmodule
protected String theModuledirectory
protected ModuleRegistry theModuleRegistry
public static final String DEFAULT_MODULEDIRECTORY
public static final String[] TOMCAT_DO_NOT_LOAD_CLASS_PREFIXES
public TomcatModuleLoader()
public TomcatModuleLoader(ClassLoader parent)
parent
- the parent ClassLoaderpublic void setRootmodule(String newValue)
newValue
- the valuegetRootmodule()
public String getRootmodule()
setRootmodule(java.lang.String)
public void setModuledirectory(String newValue)
newValue
- the valuegetModuledirectory()
public String getModuledirectory()
setModuledirectory(java.lang.String)
public void startInternal() throws org.apache.catalina.LifecycleException
startInternal
in class org.apache.catalina.loader.WebappLoader
org.apache.catalina.LifecycleException
- thrown if this TomcatModuleLoader cannot be startedpublic void stopInternal() throws org.apache.catalina.LifecycleException
stopInternal
in class org.apache.catalina.loader.WebappLoader
org.apache.catalina.LifecycleException
- thrown if this TomcatModuleLoader cannot be stoppedpublic String toString()
toString
in class org.apache.catalina.loader.WebappLoader
Copyright © 2018. All rights reserved.