org.objectweb.jonas.web.catalina50.CatalinaJWebContainerServiceImpl Class Reference

Inherits org.objectweb.jonas.web.AbsJWebContainerServiceImpl.

Inheritance diagram for org.objectweb.jonas.web.catalina50.CatalinaJWebContainerServiceImpl:

Inheritance graph
[legend]
Collaboration diagram for org.objectweb.jonas.web.catalina50.CatalinaJWebContainerServiceImpl:

Collaboration graph
[legend]
List of all members.

Public Member Functions

void doStart () throws ServiceException
synchronized void removeContext (Context context) throws JWebContainerServiceException
boolean isTomcatStarted ()
void setServer (Server server)
Host findHost (String hostName) throws JWebContainerServiceException
String getDefaultHost () throws JWebContainerServiceException
String getDefaultHttpPort () throws JWebContainerServiceException
String getDefaultHttpsPort () throws JWebContainerServiceException
void registerWarMBean (String fileName) throws RemoteException, JWebContainerServiceException
void unRegisterWarMBean (String fileName) throws RemoteException, JWebContainerServiceException

Protected Member Functions

void doInit (javax.naming.Context ctx) throws ServiceException
void initCatalinaEnvironment () throws ServiceException
javax.naming.Context setGlobalNamingResources () throws ServiceException
void doStop () throws ServiceException
void doRegisterWar (javax.naming.Context ctx) throws JWebContainerServiceException
List getConfiguredMatchingJonasContexts (String contextRoot, File fpackedWar, String destDir)
void checkStartedContext (Context context) throws JWebContainerServiceException
synchronized List getEngines () throws JWebContainerServiceException
synchronized List getContexts () throws JWebContainerServiceException
void doUnRegisterWar (javax.naming.Context ctx) throws JWebContainerServiceException
File getConfigFile () throws FileNotFoundException
Digester createServerDigester ()
void updateServerInfos ()

Static Protected Attributes

final String CONFIG_FILE = "conf/server.xml"

Detailed Description

This class provides an implementation of the Catalina service (as web container service).
Author:
Florent Benoit

Ludovic Bert (Tomcat 4.0)

Definition at line 95 of file CatalinaJWebContainerServiceImpl.java.


Member Function Documentation

void org.objectweb.jonas.web.catalina50.CatalinaJWebContainerServiceImpl.checkStartedContext Context  context  )  throws JWebContainerServiceException [protected]
 

Check that the context that was started was right configured

Parameters:
context context to check
Exceptions:
JWebContainerServiceException if the context was not right configured

Definition at line 630 of file CatalinaJWebContainerServiceImpl.java.

References org.objectweb.jonas.web.AbsJWebContainerServiceImpl.getLogger(), and org.objectweb.jonas_lib.I18n.getMessage().

Referenced by org.objectweb.jonas.web.catalina50.CatalinaJWebContainerServiceImpl.doRegisterWar().

Here is the call graph for this function:

Digester org.objectweb.jonas.web.catalina50.CatalinaJWebContainerServiceImpl.createServerDigester  )  [protected]
 

Create and configure the Digester that will be used for the xml parsing of the configuration file.

Returns:
Digester the digester containing the rules for the xml parsing of the server.xml.

Definition at line 1000 of file CatalinaJWebContainerServiceImpl.java.

Referenced by org.objectweb.jonas.web.catalina50.CatalinaJWebContainerServiceImpl.doStart().

void org.objectweb.jonas.web.catalina50.CatalinaJWebContainerServiceImpl.doInit javax.naming.Context  ctx  )  throws ServiceException [protected]
 

Initialize the Catalina service.

Parameters:
ctx the configuration context of the service.
Exceptions:
ServiceException if the initialization failed.

Definition at line 140 of file CatalinaJWebContainerServiceImpl.java.

References org.objectweb.jonas.server.LoaderManager.getAppsLoader(), org.objectweb.jonas.server.LoaderManager.getCatalinaLoader(), org.objectweb.jonas_lib.I18n.getInstance(), org.objectweb.jonas.web.AbsJWebContainerServiceImpl.getLogger(), org.objectweb.jonas.web.AbsJWebContainerServiceImpl.getMbeanServer(), org.objectweb.jonas.web.catalina50.CatalinaJWebContainerServiceImpl.initCatalinaEnvironment(), org.objectweb.jonas.web.catalina50.WebModuleProxy.setMyServer(), and org.objectweb.jonas.web.catalina50.CatalinaConnectorFactory.setMyServer().

Here is the call graph for this function:

void org.objectweb.jonas.web.catalina50.CatalinaJWebContainerServiceImpl.doRegisterWar javax.naming.Context  ctx  )  throws JWebContainerServiceException [protected]
 

Deploy a specific WAR file specified in the context.

Parameters:
ctx the context which contains the configuration in order to deploy the WAR.
Exceptions:
JWebContainerServiceException if the registration of the WAR failed.

Definition at line 368 of file CatalinaJWebContainerServiceImpl.java.

References org.objectweb.jonas.web.catalina50.CatalinaJWebContainerServiceImpl.checkStartedContext(), org.objectweb.jonas.security.realm.web.catalina50.JACC.clone(), org.objectweb.jonas.web.catalina50.CatalinaJWebContainerServiceImpl.findHost(), org.objectweb.jonas.web.catalina50.CatalinaJWebContainerServiceImpl.getConfiguredMatchingJonasContexts(), org.objectweb.jonas.web.AbsJWebContainerServiceImpl.getLogger(), org.objectweb.jonas.web.AbsJWebContainerServiceImpl.getMbeanServer(), org.objectweb.jonas_lib.I18n.getMessage(), org.objectweb.jonas.web.catalina50.JOnASStandardContext.isInServerXml(), org.objectweb.jonas.security.realm.web.catalina50.JACC.log(), org.objectweb.jonas.security.realm.web.catalina50.JACC.setContext(), org.objectweb.jonas.web.catalina50.JOnASStandardContext.setEarURL(), org.objectweb.jonas.web.catalina50.JOnASStandardContext.setJonasDeploymentDescriptor(), org.objectweb.jonas.security.realm.web.catalina50.JACC.setPermissionManager(), org.objectweb.jonas.web.catalina50.JOnASStandardContext.setWarURL(), and org.objectweb.jonas.web.catalina50.JOnASStandardContext.start().

Here is the call graph for this function:

void org.objectweb.jonas.web.catalina50.CatalinaJWebContainerServiceImpl.doStart  )  throws ServiceException
 

Start the Catalina service in a new thread

Exceptions:
ServiceException if the startup failed.

Reimplemented from org.objectweb.jonas.web.AbsJWebContainerServiceImpl.

Definition at line 240 of file CatalinaJWebContainerServiceImpl.java.

References org.objectweb.jonas.web.catalina50.CatalinaJWebContainerServiceImpl.createServerDigester(), org.objectweb.jonas.web.catalina50.CatalinaJWebContainerServiceImpl.getConfigFile(), org.objectweb.jonas.web.catalina50.CatalinaJWebContainerServiceImpl.getEngines(), org.objectweb.jonas.web.AbsJWebContainerServiceImpl.getLogger(), org.objectweb.jonas_lib.I18n.getMessage(), org.objectweb.jonas.web.AbsJWebContainerServiceImpl.getNaming(), org.objectweb.jonas_lib.naming.ContainerNaming.setComponentContext(), and org.objectweb.jonas.web.catalina50.CatalinaJWebContainerServiceImpl.setGlobalNamingResources().

Here is the call graph for this function:

void org.objectweb.jonas.web.catalina50.CatalinaJWebContainerServiceImpl.doStop  )  throws ServiceException [protected]
 

Stop the Catalina service.

Exceptions:
ServiceException if the stop failed.

Reimplemented from org.objectweb.jonas.web.AbsJWebContainerServiceImpl.

Definition at line 343 of file CatalinaJWebContainerServiceImpl.java.

References org.objectweb.jonas.web.AbsJWebContainerServiceImpl.getLogger(), and org.objectweb.jonas_lib.I18n.getMessage().

Here is the call graph for this function:

void org.objectweb.jonas.web.catalina50.CatalinaJWebContainerServiceImpl.doUnRegisterWar javax.naming.Context  ctx  )  throws JWebContainerServiceException [protected]
 

Undeploy a specific WAR file specified in the context.

Parameters:
ctx the context which contains the configuration in order to undeploy a WAR.
Exceptions:
JWebContainerServiceException if the unregistration failed.

Definition at line 698 of file CatalinaJWebContainerServiceImpl.java.

References org.objectweb.jonas.web.catalina50.CatalinaJWebContainerServiceImpl.findHost(), org.objectweb.jonas.web.catalina50.CatalinaJWebContainerServiceImpl.getContexts(), org.objectweb.jonas.web.AbsJWebContainerServiceImpl.getLogger(), org.objectweb.jonas_lib.I18n.getMessage(), and org.objectweb.jonas.web.catalina50.CatalinaJWebContainerServiceImpl.removeContext().

Here is the call graph for this function:

Host org.objectweb.jonas.web.catalina50.CatalinaJWebContainerServiceImpl.findHost String  hostName  )  throws JWebContainerServiceException
 

Find the specified host.

Parameters:
hostName the name of the host to find.
Returns:
the host found.
Exceptions:
JWebContainerServiceException if the specified host cannot be found.

Definition at line 872 of file CatalinaJWebContainerServiceImpl.java.

Referenced by org.objectweb.jonas.web.catalina50.CatalinaJWebContainerServiceImpl.doRegisterWar(), and org.objectweb.jonas.web.catalina50.CatalinaJWebContainerServiceImpl.doUnRegisterWar().

File org.objectweb.jonas.web.catalina50.CatalinaJWebContainerServiceImpl.getConfigFile  )  throws FileNotFoundException [protected]
 

Return a File object representing the server.xml configuration file.

Returns:
a File object representing the server.xml configuration file.
Exceptions:
FileNotFoundException if the configuration file is not found.

Definition at line 853 of file CatalinaJWebContainerServiceImpl.java.

References org.objectweb.jonas_lib.I18n.getMessage().

Referenced by org.objectweb.jonas.web.catalina50.CatalinaJWebContainerServiceImpl.doStart().

Here is the call graph for this function:

List org.objectweb.jonas.web.catalina50.CatalinaJWebContainerServiceImpl.getConfiguredMatchingJonasContexts String  contextRoot,
File  fpackedWar,
String  destDir
[protected]
 

Check if there is a previous JOnASStandardContext which match the current context If true, deploy our context into the configured context

Parameters:
contextRoot name of the context that we want to find preconfigured contexts
fpackedWar file of the original war file
destDir name of the unpacked directory of the war file
Returns:
true if a context was found and used

Definition at line 584 of file CatalinaJWebContainerServiceImpl.java.

References org.objectweb.jonas.web.catalina50.CatalinaJWebContainerServiceImpl.getContexts(), org.objectweb.jonas.web.AbsJWebContainerServiceImpl.getLogger(), org.objectweb.jonas_lib.I18n.getMessage(), and org.objectweb.jonas.web.catalina50.JOnASStandardContext.isInServerXml().

Referenced by org.objectweb.jonas.web.catalina50.CatalinaJWebContainerServiceImpl.doRegisterWar().

Here is the call graph for this function:

synchronized List org.objectweb.jonas.web.catalina50.CatalinaJWebContainerServiceImpl.getContexts  )  throws JWebContainerServiceException [protected]
 

Gets all the contexts of the current Tomcat server

Returns:
all the contexts of the current Tomcat server
Exceptions:
JWebContainerServiceException if contexts can not be retrieved

Definition at line 670 of file CatalinaJWebContainerServiceImpl.java.

References org.objectweb.jonas.web.catalina50.CatalinaJWebContainerServiceImpl.getEngines().

Referenced by org.objectweb.jonas.web.catalina50.CatalinaJWebContainerServiceImpl.doUnRegisterWar(), org.objectweb.jonas.web.catalina50.CatalinaJWebContainerServiceImpl.getConfiguredMatchingJonasContexts(), and org.objectweb.jonas.web.catalina50.CatalinaJWebContainerServiceImpl.removeContext().

Here is the call graph for this function:

String org.objectweb.jonas.web.catalina50.CatalinaJWebContainerServiceImpl.getDefaultHost  )  throws JWebContainerServiceException [virtual]
 

Return the Default host name of the web container.

Returns:
the Default host name of the web container.
Exceptions:
JWebContainerServiceException when default host cannot be resolved (multiple services).

Implements org.objectweb.jonas.web.AbsJWebContainerServiceImpl.

Definition at line 1036 of file CatalinaJWebContainerServiceImpl.java.

String org.objectweb.jonas.web.catalina50.CatalinaJWebContainerServiceImpl.getDefaultHttpPort  )  throws JWebContainerServiceException [virtual]
 

Return the Default HTTP port number of the web container (can be null if multiple HTTP connector has been set).

Returns:
the Default HTTP port number of the web container.
Exceptions:
JWebContainerServiceException when default HTTP port cannot be resolved (multiple occurences).

Implements org.objectweb.jonas.web.AbsJWebContainerServiceImpl.

Definition at line 1055 of file CatalinaJWebContainerServiceImpl.java.

String org.objectweb.jonas.web.catalina50.CatalinaJWebContainerServiceImpl.getDefaultHttpsPort  )  throws JWebContainerServiceException [virtual]
 

Return the Default HTTPS port number of the web container (can be null if multiple HTTPS connector has been set).

Returns:
the Default HTTPS port number of the web container.
Exceptions:
JWebContainerServiceException when default HTTPS port cannot be resolved (multiple occurences).

Implements org.objectweb.jonas.web.AbsJWebContainerServiceImpl.

Definition at line 1095 of file CatalinaJWebContainerServiceImpl.java.

synchronized List org.objectweb.jonas.web.catalina50.CatalinaJWebContainerServiceImpl.getEngines  )  throws JWebContainerServiceException [protected]
 

Gets all the engines of the current Tomcat server

Returns:
all the engines of the current Tomcat server
Exceptions:
JWebContainerServiceException if engines can not be retrieved

Definition at line 649 of file CatalinaJWebContainerServiceImpl.java.

Referenced by org.objectweb.jonas.web.catalina50.CatalinaJWebContainerServiceImpl.doStart(), and org.objectweb.jonas.web.catalina50.CatalinaJWebContainerServiceImpl.getContexts().

void org.objectweb.jonas.web.catalina50.CatalinaJWebContainerServiceImpl.initCatalinaEnvironment  )  throws ServiceException [protected]
 

Init the environment of catalina set catalina.home, catalina.base and unset the tomcat naming

Exceptions:
ServiceException if catalina home is not set

Definition at line 218 of file CatalinaJWebContainerServiceImpl.java.

Referenced by org.objectweb.jonas.web.catalina50.CatalinaJWebContainerServiceImpl.doInit().

boolean org.objectweb.jonas.web.catalina50.CatalinaJWebContainerServiceImpl.isTomcatStarted  ) 
 

The server is started ?

Returns:
boolean true if the catalina container is running.

Definition at line 833 of file CatalinaJWebContainerServiceImpl.java.

void org.objectweb.jonas.web.catalina50.CatalinaJWebContainerServiceImpl.registerWarMBean String  fileName  )  throws RemoteException, JWebContainerServiceException
 

Register a WAR by delegating the operation to the registerWar() method. This is used for JMX management.

Parameters:
fileName the name of the war to deploy.
Exceptions:
RemoteException if rmi call failed.
JWebContainerServiceException if the registration failed.

Reimplemented from org.objectweb.jonas.web.AbsJWebContainerServiceImpl.

Definition at line 1134 of file CatalinaJWebContainerServiceImpl.java.

synchronized void org.objectweb.jonas.web.catalina50.CatalinaJWebContainerServiceImpl.removeContext Context  context  )  throws JWebContainerServiceException
 

Remove the specified Context from the set of defined Contexts for its associated Host. If this is the last Context for this Host, the Host will also be removed.

Parameters:
context The Context to be removed
Exceptions:
JWebContainerServiceException if the context can not be removed

Definition at line 767 of file CatalinaJWebContainerServiceImpl.java.

References org.objectweb.jonas.web.catalina50.CatalinaJWebContainerServiceImpl.getContexts(), org.objectweb.jonas.web.AbsJWebContainerServiceImpl.getLogger(), org.objectweb.jonas.web.AbsJWebContainerServiceImpl.getMbeanServer(), and org.objectweb.jonas.web.catalina50.JOnASStandardContext.isInServerXml().

Referenced by org.objectweb.jonas.web.catalina50.CatalinaJWebContainerServiceImpl.doUnRegisterWar().

Here is the call graph for this function:

javax.naming.Context org.objectweb.jonas.web.catalina50.CatalinaJWebContainerServiceImpl.setGlobalNamingResources  )  throws ServiceException [protected]
 

Defines the naming resources for tomcat only use for avoid null pointer when using a server.xml of the original distribution

Returns:
the previous naming context
Exceptions:
ServiceException if a naming exception occurs

Definition at line 313 of file CatalinaJWebContainerServiceImpl.java.

References org.objectweb.jonas_lib.naming.ContainerNaming.createEnvironmentContext(), org.objectweb.jonas.web.AbsJWebContainerServiceImpl.getLogger(), org.objectweb.jonas_lib.I18n.getMessage(), org.objectweb.jonas.web.AbsJWebContainerServiceImpl.getNaming(), and org.objectweb.jonas_lib.naming.ContainerNaming.setComponentContext().

Referenced by org.objectweb.jonas.web.catalina50.CatalinaJWebContainerServiceImpl.doStart().

Here is the call graph for this function:

void org.objectweb.jonas.web.catalina50.CatalinaJWebContainerServiceImpl.setServer Server  server  ) 
 

Set the server instance we are configuring.

Parameters:
server The new server

Definition at line 843 of file CatalinaJWebContainerServiceImpl.java.

void org.objectweb.jonas.web.catalina50.CatalinaJWebContainerServiceImpl.unRegisterWarMBean String  fileName  )  throws RemoteException, JWebContainerServiceException
 

Unregister a WAR by delegating the operation to the unRegisterWar() method. This is used for JMX management.

Parameters:
fileName the name of the war to undeploy.
Exceptions:
RemoteException if rmi call failed.
JWebContainerServiceException if the unregistration failed.

Reimplemented from org.objectweb.jonas.web.AbsJWebContainerServiceImpl.

Definition at line 1156 of file CatalinaJWebContainerServiceImpl.java.

void org.objectweb.jonas.web.catalina50.CatalinaJWebContainerServiceImpl.updateServerInfos  )  [protected, virtual]
 

Update info of the serverName and serverVersion

Implements org.objectweb.jonas.web.AbsJWebContainerServiceImpl.

Definition at line 1018 of file CatalinaJWebContainerServiceImpl.java.

References org.objectweb.jonas.web.AbsJWebContainerServiceImpl.setServerName(), and org.objectweb.jonas.web.AbsJWebContainerServiceImpl.setServerVersion().

Here is the call graph for this function:


Member Data Documentation

final String org.objectweb.jonas.web.catalina50.CatalinaJWebContainerServiceImpl.CONFIG_FILE = "conf/server.xml" [static, protected]
 

Relative path of the configuration file

Definition at line 102 of file CatalinaJWebContainerServiceImpl.java.


The documentation for this class was generated from the following file:
Generated on Tue Feb 15 15:08:16 2005 for JOnAS by  doxygen 1.3.9.1