public class TomcatWebAppBuilder extends java.lang.Object implements WebAppBuilder, ContextListener, ParentClassLoaderFinder
Modifier and Type | Class and Description |
---|---|
static class |
TomcatWebAppBuilder.ContextInfo |
class |
TomcatWebAppBuilder.StandardContextInfo |
ParentClassLoaderFinder.Helper
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DEFAULT_J2EE_SERVER |
static java.lang.String |
IGNORE_CONTEXT
Flag for ignore context
|
static java.lang.String |
OPENEJB_CROSSCONTEXT_PROPERTY |
static java.lang.String |
OPENEJB_JSESSION_ID_SUPPORT |
static java.lang.String |
OPENEJB_MYFACES_DISABLE_DEFAULT_VALUES |
static java.lang.String |
OPENEJB_SESSION_MANAGER_PROPERTY |
static java.lang.String |
OPENEJB_WEBAPP_MODULE_ID |
static java.lang.String |
TOMEE_EAT_EXCEPTION_PROP |
static java.lang.String |
TOMEE_INIT_J2EE_INFO |
FALLBACK
Constructor and Description |
---|
TomcatWebAppBuilder()
Creates a new web application builder
instance.
|
Modifier and Type | Method and Description |
---|---|
TomcatWebAppBuilder.ContextInfo |
addContextInfo(java.lang.String host,
StandardContext standardContext)
Add new context info.
|
void |
afterStart(StandardContext standardContext)
Called after starting context.
|
void |
afterStop(StandardContext standardContext)
Called after starting context.
|
void |
afterStop(StandardServer standardServer)
Called after starting context.
|
protected java.io.File |
appBase(StandardHost standardHost)
Returns application base of the given host.
|
java.util.Collection<java.lang.String> |
availableApps() |
void |
beforeStart(StandardContext standardContext)
Called before starting context.
|
void |
beforeStop(StandardContext standardContext)
Called before stopping context.
|
void |
checkHost(StandardHost standardHost)
Called on periodic events.
|
void |
configureStart(LifecycleEvent event,
StandardContext standardContext) |
void |
deployWar(StandardContext standardContext,
java.lang.String host,
AppInfo info) |
void |
deployWebApps(AppInfo appInfo,
java.lang.ClassLoader classLoader) |
void |
destroy(StandardContext standardContext)
Called when destroying context.
|
TomcatWebAppBuilder.ContextInfo |
getContextInfo(StandardContext standardContext)
Gets context info for given context.
|
TomcatWebAppBuilder.ContextInfo |
getContextInfo(java.lang.String appName) |
java.util.Map<java.lang.ClassLoader,InstanceManager> |
getInstanceManagers() |
java.util.Map<java.lang.ClassLoader,java.util.Map<java.lang.String,java.util.Set<java.lang.String>>> |
getJsfClasses() |
java.lang.ClassLoader |
getParentClassLoader(java.lang.ClassLoader fallback) |
java.util.Map<java.lang.String,Realm> |
getRealms() |
void |
init(StandardContext standardContext)
Web context is initialized.
|
void |
initJ2EEInfo(StandardContext standardContext) |
void |
setFinderOnContextConfig(StandardContext standardContext,
AppModule appModule) |
TomcatWebAppBuilder.ContextInfo |
standaAloneWebAppInfo(java.io.File file) |
void |
start()
Start operation.
|
void |
start(StandardContext standardContext)
Called when starting context.
|
void |
start(StandardServer server)
Called when starting context.
|
void |
stop()
Stop operation.
|
void |
stop(StandardContext standardContext)
Called when stopping context.
|
protected Realm |
tomeeRealm(Realm realm) |
void |
undeployWebApps(AppInfo appInfo) |
public static final java.lang.String OPENEJB_CROSSCONTEXT_PROPERTY
public static final java.lang.String OPENEJB_SESSION_MANAGER_PROPERTY
public static final java.lang.String OPENEJB_JSESSION_ID_SUPPORT
public static final java.lang.String OPENEJB_MYFACES_DISABLE_DEFAULT_VALUES
public static final java.lang.String IGNORE_CONTEXT
public static final java.lang.String DEFAULT_J2EE_SERVER
public static final java.lang.String OPENEJB_WEBAPP_MODULE_ID
public static final java.lang.String TOMEE_EAT_EXCEPTION_PROP
public static final java.lang.String TOMEE_INIT_J2EE_INFO
public TomcatWebAppBuilder()
protected Realm tomeeRealm(Realm realm)
public void start()
public void stop()
public void start(StandardServer server)
ContextListener
start
in interface ContextListener
server
- web contextpublic void deployWebApps(AppInfo appInfo, java.lang.ClassLoader classLoader) throws java.lang.Exception
deployWebApps
in interface WebAppBuilder
java.lang.Exception
public void deployWar(StandardContext standardContext, java.lang.String host, AppInfo info)
public TomcatWebAppBuilder.ContextInfo standaAloneWebAppInfo(java.io.File file)
public java.util.Collection<java.lang.String> availableApps()
public void undeployWebApps(AppInfo appInfo) throws java.lang.Exception
undeployWebApps
in interface WebAppBuilder
java.lang.Exception
public void init(StandardContext standardContext)
init
in interface ContextListener
standardContext
- web contextpublic void initJ2EEInfo(StandardContext standardContext)
public TomcatWebAppBuilder.ContextInfo getContextInfo(java.lang.String appName)
public void beforeStart(StandardContext standardContext)
beforeStart
in interface ContextListener
standardContext
- web contextpublic void configureStart(LifecycleEvent event, StandardContext standardContext)
configureStart
in interface ContextListener
public void start(StandardContext standardContext)
ContextListener
start
in interface ContextListener
standardContext
- web contextpublic void setFinderOnContextConfig(StandardContext standardContext, AppModule appModule)
public void afterStart(StandardContext standardContext)
afterStart
in interface ContextListener
standardContext
- web contextpublic void beforeStop(StandardContext standardContext)
beforeStop
in interface ContextListener
standardContext
- web contextpublic void stop(StandardContext standardContext)
stop
in interface ContextListener
standardContext
- web contextpublic void afterStop(StandardContext standardContext)
afterStop
in interface ContextListener
standardContext
- web contextpublic void destroy(StandardContext standardContext)
destroy
in interface ContextListener
standardContext
- web contextpublic void afterStop(StandardServer standardServer)
afterStop
in interface ContextListener
standardServer
- web contextpublic void checkHost(StandardHost standardHost)
checkHost
in interface ContextListener
standardHost
- hostprotected java.io.File appBase(StandardHost standardHost)
standardHost
- tomcat hostpublic TomcatWebAppBuilder.ContextInfo getContextInfo(StandardContext standardContext)
standardContext
- contextpublic TomcatWebAppBuilder.ContextInfo addContextInfo(java.lang.String host, StandardContext standardContext)
host
- host namestandardContext
- contextpublic java.util.Map<java.lang.ClassLoader,java.util.Map<java.lang.String,java.util.Set<java.lang.String>>> getJsfClasses()
getJsfClasses
in interface WebAppBuilder
public java.lang.ClassLoader getParentClassLoader(java.lang.ClassLoader fallback)
getParentClassLoader
in interface ParentClassLoaderFinder
public java.util.Map<java.lang.String,Realm> getRealms()
public java.util.Map<java.lang.ClassLoader,InstanceManager> getInstanceManagers()