org.jboss.web.tomcat.tc5
Class Tomcat5

java.lang.Object
  extended byorg.jboss.mx.util.JBossNotificationBroadcasterSupport (src) 
      extended byorg.jboss.system.ServiceMBeanSupport (src) 
          extended byorg.jboss.deployment.SubDeployerSupport (src) 
              extended byorg.jboss.web.AbstractWebContainer (src) 
                  extended byorg.jboss.web.tomcat.tc5.Tomcat5
All Implemented Interfaces:
java.util.EventListener, MBeanRegistration (src) , NotificationBroadcaster (src) , NotificationEmitter (src) , NotificationListener (src) , Service (src) , ServiceMBean (src) , SubDeployer (src) , Tomcat5MBean (src)

public class Tomcat5
extends AbstractWebContainer (src)
implements Tomcat5MBean (src) , NotificationListener (src)

An implementation of the AbstractWebContainer for the Jakarta Tomcat5 servlet container. It has no code dependency on tomcat - only the new JMX model is used.

Tomcat5 is organized as a set of mbeans - just like jboss.

See Also:
AbstractWebContainer (src)

Nested Class Summary
 
Nested classes inherited from class org.jboss.web.AbstractWebContainer (src)
AbstractWebContainer.WebDescriptorParser (src)
 
Nested classes inherited from class org.jboss.deployment.SubDeployerSupport (src)
SubDeployerSupport.ClassConfiguration (src)
 
Field Summary
static java.lang.String DEFAULT_CACHE_NAME
          Default value for property cacheName.
protected  java.lang.String managerClass
          The fully qualified name of the class that will be used for session management if distributable is set to true.
static java.lang.String NAME
           
 
Fields inherited from class org.jboss.web.AbstractWebContainer (src)
acceptNonWarDirs, defaultSecurityDomain, DEPLOYER, deploymentMap, ERROR, java2ClassLoadingCompliance, lenientEjbLink, unpackWars, WEB_APP, WEB_MODULE
 
Fields inherited from class org.jboss.deployment.SubDeployerSupport (src)
CONFIGURATION, mainDeployer, nativePrefix, nativeSuffix, relativeOrder, suffixes, tempDeployDir
 
Fields inherited from class org.jboss.system.ServiceMBeanSupport (src)
log, server, SERVICE_CONTROLLER_SIG, serviceName
 
Fields inherited from interface org.jboss.web.tomcat.tc5.Tomcat5MBean (src)
TOMCAT_CONNECTORS_STARTED
 
Fields inherited from interface org.jboss.deployment.SubDeployer (src)
CREATE_NOTIFICATION, DESTROY_NOTIFICATION, INIT_NOTIFICATION, RELATIVE_ORDER_100, RELATIVE_ORDER_200, RELATIVE_ORDER_300, RELATIVE_ORDER_400, RELATIVE_ORDER_500, RELATIVE_ORDER_600, RELATIVE_ORDER_700, RELATIVE_ORDER_800, RELATIVE_ORDER_900, START_NOTIFICATION, STOP_NOTIFICATION
 
Fields inherited from interface org.jboss.system.ServiceMBean (src)
CREATE_EVENT, CREATED, DESTROY_EVENT, DESTROYED, FAILED, REGISTERED, START_EVENT, STARTED, STARTING, states, STOP_EVENT, STOPPED, STOPPING, UNREGISTERED
 
Constructor Summary
Tomcat5()
           
 
Method Summary
 java.lang.String getCacheName()
          Gets the JMX object name of a shared TreeCache to be used for clustered single-sign-on.
 java.lang.String getConfigFile()
          Get the name of the external tomcat server configuration file.
 java.lang.String getContextMBeanCode()
           
 AbstractWebDeployer (src) getDeployer(DeploymentInfo (src)  di)
           
 java.lang.String getDomain()
           
 java.lang.String[] getFilteredPackages()
           
 java.lang.String getManagerClass()
           
 java.lang.String getName()
          Use the short class name as the default for the service name.
 java.lang.String getSessionIdAlphabet()
          The SessionIdAlphabet is the set of characters used to create a session Id
 int getSnapshotInterval()
          Get the snapshot interval
 java.lang.String getSnapshotMode()
          Get the snapshot mode
 java.lang.String getSubjectAttributeName()
          Get the request attribute name under which the JAAS Subject is store
 boolean getUseJBossWebLoader()
          Get the JBoss UCL use flag
 void handleNotification(Notification (src)  msg, java.lang.Object handback)
          Callback method from the broadcaster MBean this listener implementation is registered to.
 boolean isAllowSelfPrivilegedWebApps()
          Get whether web-apps are able to control the privileged flag
 boolean isUseJK()
          Get the clustering code failover behaviour whether MOD_JK(2) is used or not.
 boolean isUseLocalCache()
          Get the clustering code cache behaviour
 void setAllowSelfPrivilegedWebApps(boolean allowSelfPrivilegedWebApps)
          Set whether web-apps are able to control the privileged flag
 void setCacheName(java.lang.String cacheName)
          Gets the JMX object name of a shared TreeCache to be used for clustered single-sign-on.
 void setConfigFile(java.lang.String configFile)
          Set the name of the external tomcat server configuration file.
 void setContextMBeanCode(java.lang.String className)
           
 void setDomain(java.lang.String catalinaDomain)
          The most important atteribute - defines the managed domain.
 void setFilteredPackages(java.lang.String[] pkgs)
           
 void setManagerClass(java.lang.String managerClass)
           
 void setSecurityManagerService(JaasSecurityManagerServiceMBean (src)  mgr)
          Set the SecurityManagerService binding.
 void setSessionIdAlphabet(java.lang.String sessionIdAlphabet)
          The SessionIdAlphabet is the set of characters used to create a session Id
 void setSnapshotInterval(int interval)
          Set the snapshot interval in milliseconds for snapshot mode = interval
 void setSnapshotMode(java.lang.String mode)
          Set the snapshot mode.
 void setSubjectAttributeName(java.lang.String name)
          Set the request attribute name under which the JAAS Subject will be stored when running with a security mgr that supports JAAS.
 void setUseJBossWebLoader(boolean flag)
          Set the JBoss UCL use flag
 void setUseJK(boolean useJK)
          Set the clustering code failover behaviour whether MOD_JK(2) is used or not.
 void setUseLocalCache(boolean useLocalCache)
          Set the clustering code cache behaviour
 void startConnectors()
          Start all connectors of the Domain + ":type=Service,serviceName=jboss.web" service.
 void startService()
          Performs SubDeployer registration.
 void stopConnectors()
          Stop all connectors of the Domain + ":type=Service,serviceName=jboss.web" service.
 void stopService()
          Performs SubDeployer deregistration.
 
Methods inherited from class org.jboss.web.AbstractWebContainer (src)
accepts, addDeployedApp, create, destroy, getAcceptNonWarDirs, getClassLoaderURLs, getCompileClasspath, getConfig, getDefaultSecurityDomain, getDeployedApp, getDeployedApplications, getJava2ClassLoadingCompliance, getLenientEjbLink, getUnpackWars, init, isDeployed, parseMetaData, processNestedDeployments, removeDeployedApp, setAcceptNonWarDirs, setConfig, setDefaultSecurityDomain, setJava2ClassLoadingCompliance, setLenientEjbLink, setUnpackWars, start, stop
 
Methods inherited from class org.jboss.deployment.SubDeployerSupport (src)
addDeployableFiles, addDeployableJar, createService, deployUrl, destroyService, emitNotification, getRelativeOrder, getSuffixes, isDeployable, setRelativeOrder, setSuffixes
 
Methods inherited from class org.jboss.system.ServiceMBeanSupport (src)
create, destroy, getLog, getNextNotificationSequenceNumber, getObjectName, getServer, getServiceName, getState, getStateString, jbossInternalCreate, jbossInternalDescription, jbossInternalDestroy, jbossInternalLifecycle, jbossInternalStart, jbossInternalStop, postDeregister, postRegister, preDeregister, preRegister, start, stop
 
Methods inherited from class org.jboss.mx.util.JBossNotificationBroadcasterSupport (src)
addNotificationListener, getNotificationInfo, handleNotification, removeNotificationListener, removeNotificationListener, sendNotification
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jboss.deployment.SubDeployer (src)
getServiceName
 

Field Detail

NAME

public static final java.lang.String NAME
See Also:
Constant Field Values (src)

DEFAULT_CACHE_NAME

public static final java.lang.String DEFAULT_CACHE_NAME
Default value for property cacheName. This name will be used by JBossCache exclusively for Tomcat clustering, e.g., session and sso replication.

See Also:
Constant Field Values (src)

managerClass

protected java.lang.String managerClass
The fully qualified name of the class that will be used for session management if distributable is set to true.

Constructor Detail

Tomcat5

public Tomcat5()
Method Detail

getName

public java.lang.String getName()
Description copied from class: ServiceMBeanSupport (src)
Use the short class name as the default for the service name.

Specified by:
getName in interface ServiceMBean (src)
Overrides:
getName in class ServiceMBeanSupport (src)

getManagerClass

public java.lang.String getManagerClass()
Specified by:
getManagerClass in interface Tomcat5MBean (src)

setManagerClass

public void setManagerClass(java.lang.String managerClass)
Specified by:
setManagerClass in interface Tomcat5MBean (src)

getDomain

public java.lang.String getDomain()
Specified by:
getDomain in interface Tomcat5MBean (src)
Returns:
the jmx domain for the tomcat management mbeans

setDomain

public void setDomain(java.lang.String catalinaDomain)
The most important atteribute - defines the managed domain. A catalina instance (engine) corresponds to a JMX domain, that's how we know where to deploy webapps.

Specified by:
setDomain in interface Tomcat5MBean (src)
Parameters:
catalinaDomain - the domain portion of the JMX ObjectNames

setContextMBeanCode

public void setContextMBeanCode(java.lang.String className)
Specified by:
setContextMBeanCode in interface Tomcat5MBean (src)

getContextMBeanCode

public java.lang.String getContextMBeanCode()
Specified by:
getContextMBeanCode in interface Tomcat5MBean (src)

setSnapshotInterval

public void setSnapshotInterval(int interval)
Set the snapshot interval in milliseconds for snapshot mode = interval

Specified by:
setSnapshotInterval in interface Tomcat5MBean (src)

getSnapshotInterval

public int getSnapshotInterval()
Get the snapshot interval

Specified by:
getSnapshotInterval in interface Tomcat5MBean (src)

setSnapshotMode

public void setSnapshotMode(java.lang.String mode)
Set the snapshot mode. Currently supported: instant or interval

Specified by:
setSnapshotMode in interface Tomcat5MBean (src)

getSnapshotMode

public java.lang.String getSnapshotMode()
Get the snapshot mode

Specified by:
getSnapshotMode in interface Tomcat5MBean (src)

getCacheName

public java.lang.String getCacheName()
Gets the JMX object name of a shared TreeCache to be used for clustered single-sign-on.

Specified by:
getCacheName in interface Tomcat5MBean (src)
See Also:
DEFAULT_CACHE_NAME, TreeCacheSSOClusterManager (src)

setCacheName

public void setCacheName(java.lang.String cacheName)
Gets the JMX object name of a shared TreeCache to be used for clustered single-sign-on.

NOTE: TreeCache must be deployed before this service.

Specified by:
setCacheName in interface Tomcat5MBean (src)
See Also:
DEFAULT_CACHE_NAME, TreeCacheSSOClusterManager (src)

isUseLocalCache

public boolean isUseLocalCache()
Description copied from interface: Tomcat5MBean (src)
Get the clustering code cache behaviour

Specified by:
isUseLocalCache in interface Tomcat5MBean (src)

setUseLocalCache

public void setUseLocalCache(boolean useLocalCache)
Description copied from interface: Tomcat5MBean (src)
Set the clustering code cache behaviour

Specified by:
setUseLocalCache in interface Tomcat5MBean (src)

isUseJK

public boolean isUseJK()
Description copied from interface: Tomcat5MBean (src)
Get the clustering code failover behaviour whether MOD_JK(2) is used or not.

Specified by:
isUseJK in interface Tomcat5MBean (src)

setUseJK

public void setUseJK(boolean useJK)
Description copied from interface: Tomcat5MBean (src)
Set the clustering code failover behaviour whether MOD_JK(2) is used or not.

Specified by:
setUseJK in interface Tomcat5MBean (src)

setSessionIdAlphabet

public void setSessionIdAlphabet(java.lang.String sessionIdAlphabet)
The SessionIdAlphabet is the set of characters used to create a session Id

Specified by:
setSessionIdAlphabet in interface Tomcat5MBean (src)

getSessionIdAlphabet

public java.lang.String getSessionIdAlphabet()
The SessionIdAlphabet is the set of characters used to create a session Id

Specified by:
getSessionIdAlphabet in interface Tomcat5MBean (src)

getUseJBossWebLoader

public boolean getUseJBossWebLoader()
Description copied from interface: Tomcat5MBean (src)
Get the JBoss UCL use flag

Specified by:
getUseJBossWebLoader in interface Tomcat5MBean (src)

setUseJBossWebLoader

public void setUseJBossWebLoader(boolean flag)
Description copied from interface: Tomcat5MBean (src)
Set the JBoss UCL use flag

Specified by:
setUseJBossWebLoader in interface Tomcat5MBean (src)

getConfigFile

public java.lang.String getConfigFile()
Description copied from interface: Tomcat5MBean (src)
Get the name of the external tomcat server configuration file.

Specified by:
getConfigFile in interface Tomcat5MBean (src)
Returns:
the config file name, server.xml for example

setConfigFile

public void setConfigFile(java.lang.String configFile)
Description copied from interface: Tomcat5MBean (src)
Set the name of the external tomcat server configuration file.

Specified by:
setConfigFile in interface Tomcat5MBean (src)
Parameters:
configFile - - the config file name, server.xml for example

getSubjectAttributeName

public java.lang.String getSubjectAttributeName()
Description copied from interface: Tomcat5MBean (src)
Get the request attribute name under which the JAAS Subject is store

Specified by:
getSubjectAttributeName in interface Tomcat5MBean (src)
Overrides:
getSubjectAttributeName in class AbstractWebContainer (src)

setSubjectAttributeName

public void setSubjectAttributeName(java.lang.String name)
Description copied from interface: Tomcat5MBean (src)
Set the request attribute name under which the JAAS Subject will be stored when running with a security mgr that supports JAAS. If this is empty then the Subject will not be store in the request.

Specified by:
setSubjectAttributeName in interface Tomcat5MBean (src)
Overrides:
setSubjectAttributeName in class AbstractWebContainer (src)

isAllowSelfPrivilegedWebApps

public boolean isAllowSelfPrivilegedWebApps()
Description copied from interface: Tomcat5MBean (src)
Get whether web-apps are able to control the privileged flag

Specified by:
isAllowSelfPrivilegedWebApps in interface Tomcat5MBean (src)

setAllowSelfPrivilegedWebApps

public void setAllowSelfPrivilegedWebApps(boolean allowSelfPrivilegedWebApps)
Description copied from interface: Tomcat5MBean (src)
Set whether web-apps are able to control the privileged flag

Specified by:
setAllowSelfPrivilegedWebApps in interface Tomcat5MBean (src)

setSecurityManagerService

public void setSecurityManagerService(JaasSecurityManagerServiceMBean (src)  mgr)
Description copied from interface: Tomcat5MBean (src)
Set the SecurityManagerService binding. This is used to flush any associated authentication cache on session invalidation.

Specified by:
setSecurityManagerService in interface Tomcat5MBean (src)
Parameters:
mgr - the JaasSecurityManagerServiceMBean

getFilteredPackages

public java.lang.String[] getFilteredPackages()
Specified by:
getFilteredPackages in interface Tomcat5MBean (src)
Returns:

setFilteredPackages

public void setFilteredPackages(java.lang.String[] pkgs)
Specified by:
setFilteredPackages in interface Tomcat5MBean (src)
Parameters:
pkgs -

startService

public void startService()
                  throws java.lang.Exception
Description copied from class: SubDeployerSupport (src)
Performs SubDeployer registration.

Overrides:
startService in class AbstractWebContainer (src)
Throws:
java.lang.Exception

stopService

public void stopService()
                 throws java.lang.Exception
Description copied from class: SubDeployerSupport (src)
Performs SubDeployer deregistration.

Overrides:
stopService in class SubDeployerSupport (src)
Throws:
java.lang.Exception

startConnectors

public void startConnectors()
                     throws java.lang.Exception
Description copied from interface: Tomcat5MBean (src)
Start all connectors of the Domain + ":type=Service,serviceName=jboss.web" service.

Specified by:
startConnectors in interface Tomcat5MBean (src)
Throws:
java.lang.Exception

stopConnectors

public void stopConnectors()
                    throws java.lang.Exception
Description copied from interface: Tomcat5MBean (src)
Stop all connectors of the Domain + ":type=Service,serviceName=jboss.web" service.

Specified by:
stopConnectors in interface Tomcat5MBean (src)
Throws:
java.lang.Exception

handleNotification

public void handleNotification(Notification (src)  msg,
                               java.lang.Object handback)
Description copied from interface: NotificationListener (src)
Callback method from the broadcaster MBean this listener implementation is registered to.

Specified by:
handleNotification in interface NotificationListener (src)
Parameters:
msg - the notification object
handback - the handback object given to the broadcaster upon listener registration

getDeployer

public AbstractWebDeployer (src)  getDeployer(DeploymentInfo (src)  di)
                                throws java.lang.Exception
Specified by:
getDeployer in class AbstractWebContainer (src)
Throws:
java.lang.Exception