org.apache.tomee.catalina
Class TomcatWebAppBuilder

java.lang.Object
  extended by org.apache.tomee.catalina.TomcatWebAppBuilder
All Implemented Interfaces:
WebAppBuilder, ParentClassLoaderFinder, ContextListener

public class TomcatWebAppBuilder
extends Object
implements WebAppBuilder, ContextListener, ParentClassLoaderFinder

Web application builder.

Version:
$Rev$ $Date$

Nested Class Summary
static class TomcatWebAppBuilder.ContextInfo
           
 class TomcatWebAppBuilder.StandardContextInfo
           
 
Nested classes/interfaces inherited from interface org.apache.openejb.core.ParentClassLoaderFinder
ParentClassLoaderFinder.Helper
 
Field Summary
static String DEFAULT_J2EE_SERVER
           
static String IGNORE_CONTEXT
          Flag for ignore context
static String OPENEJB_CROSSCONTEXT_PROPERTY
           
static String OPENEJB_JSESSION_ID_SUPPORT
           
static String OPENEJB_MYFACES_DISABLE_DEFAULT_VALUES
           
static String OPENEJB_SESSION_MANAGER_PROPERTY
           
static String OPENEJB_WEBAPP_MODULE_ID
           
static String TOMEE_EAT_EXCEPTION_PROP
           
static String TOMEE_INIT_J2EE_INFO
           
 
Fields inherited from interface org.apache.openejb.core.ParentClassLoaderFinder
FALLBACK
 
Constructor Summary
TomcatWebAppBuilder()
          Creates a new web application builder instance.
 
Method Summary
 void afterStart(org.apache.catalina.core.StandardContext standardContext)
          Called after starting context.
 void afterStop(org.apache.catalina.core.StandardContext standardContext)
          Called after starting context.
 void afterStop(org.apache.catalina.core.StandardServer standardServer)
          Called after stopping server
protected  File appBase(org.apache.catalina.core.StandardHost standardHost)
          Returns application base of the given host.
 Collection<String> availableApps()
           
 void beforeStart(org.apache.catalina.core.StandardContext standardContext)
          Called before starting context.
 void beforeStop(org.apache.catalina.core.StandardContext standardContext)
          Called before stopping context.
 void checkHost(org.apache.catalina.core.StandardHost standardHost)
          Called on periodic events.
 void configureStart(org.apache.catalina.core.StandardContext standardContext)
           
 void deployWar(org.apache.catalina.core.StandardContext standardContext, String host, AppInfo info)
           
 void deployWebApps(AppInfo appInfo, ClassLoader classLoader)
          
 void destroy(org.apache.catalina.core.StandardContext standardContext)
          Called when destroying context.
 TomcatWebAppBuilder.ContextInfo getContextInfo(org.apache.catalina.core.StandardContext standardContext)
          Gets context info for given context.
 TomcatWebAppBuilder.ContextInfo getContextInfo(String appName)
           
 Map<ClassLoader,Map<String,Set<String>>> getJsfClasses()
           
 ClassLoader getParentClassLoader(ClassLoader fallback)
           
 Map<String,org.apache.catalina.Realm> getRealms()
           
 void init(org.apache.catalina.core.StandardContext standardContext)
          Web context is initialized.
 void initJ2EEInfo(org.apache.catalina.core.StandardContext standardContext)
           
 TomcatWebAppBuilder.ContextInfo standaAloneWebAppInfo(File file)
           
 void start()
          Start operation.
 void start(org.apache.catalina.core.StandardContext standardContext)
          Called when starting context.
 void start(org.apache.catalina.core.StandardServer server)
           
 void stop()
          Stop operation.
 void stop(org.apache.catalina.core.StandardContext standardContext)
          Called when stopping context.
protected  org.apache.catalina.Realm tomeeRealm(org.apache.catalina.Realm realm)
           
 void undeployWebApps(AppInfo appInfo)
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OPENEJB_CROSSCONTEXT_PROPERTY

public static final String OPENEJB_CROSSCONTEXT_PROPERTY
See Also:
Constant Field Values

OPENEJB_SESSION_MANAGER_PROPERTY

public static final String OPENEJB_SESSION_MANAGER_PROPERTY
See Also:
Constant Field Values

OPENEJB_JSESSION_ID_SUPPORT

public static final String OPENEJB_JSESSION_ID_SUPPORT
See Also:
Constant Field Values

OPENEJB_MYFACES_DISABLE_DEFAULT_VALUES

public static final String OPENEJB_MYFACES_DISABLE_DEFAULT_VALUES
See Also:
Constant Field Values

IGNORE_CONTEXT

public static final String IGNORE_CONTEXT
Flag for ignore context


DEFAULT_J2EE_SERVER

public static final String DEFAULT_J2EE_SERVER
See Also:
Constant Field Values

OPENEJB_WEBAPP_MODULE_ID

public static final String OPENEJB_WEBAPP_MODULE_ID
See Also:
Constant Field Values

TOMEE_EAT_EXCEPTION_PROP

public static final String TOMEE_EAT_EXCEPTION_PROP
See Also:
Constant Field Values

TOMEE_INIT_J2EE_INFO

public static final String TOMEE_INIT_J2EE_INFO
See Also:
Constant Field Values
Constructor Detail

TomcatWebAppBuilder

public TomcatWebAppBuilder()
Creates a new web application builder instance.

Method Detail

tomeeRealm

protected org.apache.catalina.Realm tomeeRealm(org.apache.catalina.Realm realm)

start

public void start()
Start operation.


stop

public void stop()
Stop operation.


start

public void start(org.apache.catalina.core.StandardServer server)
Specified by:
start in interface ContextListener

deployWebApps

public void deployWebApps(AppInfo appInfo,
                          ClassLoader classLoader)
                   throws Exception

Specified by:
deployWebApps in interface WebAppBuilder
Throws:
Exception

deployWar

public void deployWar(org.apache.catalina.core.StandardContext standardContext,
                      String host,
                      AppInfo info)

standaAloneWebAppInfo

public TomcatWebAppBuilder.ContextInfo standaAloneWebAppInfo(File file)

availableApps

public Collection<String> availableApps()

undeployWebApps

public void undeployWebApps(AppInfo appInfo)
                     throws Exception

Specified by:
undeployWebApps in interface WebAppBuilder
Throws:
Exception

init

public void init(org.apache.catalina.core.StandardContext standardContext)
Web context is initialized.

Specified by:
init in interface ContextListener
Parameters:
standardContext - web context

initJ2EEInfo

public void initJ2EEInfo(org.apache.catalina.core.StandardContext standardContext)

getContextInfo

public TomcatWebAppBuilder.ContextInfo getContextInfo(String appName)

beforeStart

public void beforeStart(org.apache.catalina.core.StandardContext standardContext)
Called before starting context.

Specified by:
beforeStart in interface ContextListener
Parameters:
standardContext - web context

configureStart

public void configureStart(org.apache.catalina.core.StandardContext standardContext)
Specified by:
configureStart in interface ContextListener

start

public void start(org.apache.catalina.core.StandardContext standardContext)
Called when starting context.

Specified by:
start in interface ContextListener
Parameters:
standardContext - web context

afterStart

public void afterStart(org.apache.catalina.core.StandardContext standardContext)
Called after starting context.

Specified by:
afterStart in interface ContextListener
Parameters:
standardContext - web context

beforeStop

public void beforeStop(org.apache.catalina.core.StandardContext standardContext)
Called before stopping context.

Specified by:
beforeStop in interface ContextListener
Parameters:
standardContext - web context

stop

public void stop(org.apache.catalina.core.StandardContext standardContext)
Called when stopping context.

Specified by:
stop in interface ContextListener
Parameters:
standardContext - web context

afterStop

public void afterStop(org.apache.catalina.core.StandardContext standardContext)
Called after starting context.

Specified by:
afterStop in interface ContextListener
Parameters:
standardContext - web context

destroy

public void destroy(org.apache.catalina.core.StandardContext standardContext)
Called when destroying context.

Specified by:
destroy in interface ContextListener
Parameters:
standardContext - web context

afterStop

public void afterStop(org.apache.catalina.core.StandardServer standardServer)
Called after stopping server

Specified by:
afterStop in interface ContextListener
Parameters:
standardServer - server instance

checkHost

public void checkHost(org.apache.catalina.core.StandardHost standardHost)
Called on periodic events.

Specified by:
checkHost in interface ContextListener
Parameters:
standardHost - host

appBase

protected File appBase(org.apache.catalina.core.StandardHost standardHost)
Returns application base of the given host.

Parameters:
standardHost - tomcat host
Returns:
application base of the given host

getContextInfo

public TomcatWebAppBuilder.ContextInfo getContextInfo(org.apache.catalina.core.StandardContext standardContext)
Gets context info for given context.

Parameters:
standardContext - context
Returns:
context info

getJsfClasses

public Map<ClassLoader,Map<String,Set<String>>> getJsfClasses()
Specified by:
getJsfClasses in interface WebAppBuilder

getParentClassLoader

public ClassLoader getParentClassLoader(ClassLoader fallback)
Specified by:
getParentClassLoader in interface ParentClassLoaderFinder

getRealms

public Map<String,org.apache.catalina.Realm> getRealms()


Copyright © 1999–2015 The Apache Software Foundation. All rights reserved.