|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.management.NotificationBroadcasterSupport
org.objectweb.jonas.management.ReconfigDispatcher
org.objectweb.jonas.service.AbsServiceImpl
org.objectweb.jonas.web.AbsJWebContainerServiceImpl
org.objectweb.jonas.web.catalina55.CatalinaJWebContainerServiceImpl
This class provides an implementation of the Catalina service (as web container service).
| Nested Class Summary |
| Nested classes inherited from class org.objectweb.jonas.web.AbsJWebContainerServiceImpl |
AbsJWebContainerServiceImpl.WebLoaderHolder |
| Field Summary | |
protected static java.lang.String |
CONFIG_FILE
Relative path of the configuration file |
| Fields inherited from class org.objectweb.jonas.web.AbsJWebContainerServiceImpl |
AUTOLOADDIR, CLASS, DESCRIPTORS, JONAS_BASE, PARSINGWITHVALIDATION, WEBAPPS_DIR, WORK_DIR, WORK_WEBAPPS_DIR |
| Fields inherited from class org.objectweb.jonas.management.ReconfigDispatcher |
RECONFIG_TYPE, SAVE_RECONFIG_TYPE |
| Constructor Summary | |
CatalinaJWebContainerServiceImpl()
|
|
| Method Summary | |
protected void |
checkStartedContext(org.apache.catalina.Context context,
PermissionManager permissionManager)
Check that the context that was started was right configured |
protected org.apache.tomcat.util.digester.Digester |
createServerDigester()
Create and configure the Digester that will be used for the xml parsing of the configuration file. |
protected void |
doInit(javax.naming.Context ctx)
Initialize the Catalina service. |
protected void |
doRegisterWar(javax.naming.Context ctx)
Deploy a specific WAR file specified in the context. |
void |
doStart()
Start the Catalina service in a new thread |
protected void |
doStop()
Stop the Catalina service. |
protected void |
doUnRegisterWar(javax.naming.Context ctx)
Undeploy a specific WAR file specified in the context. |
org.apache.catalina.Host |
findHost(java.lang.String hostName)
Find the specified host. |
protected java.io.File |
getConfigFile()
Return a File object representing the server.xml configuration file. |
protected java.util.List |
getConfiguredMatchingJonasContexts(java.lang.String contextRoot,
java.io.File fpackedWar,
java.lang.String destDir)
Check if there is a previous JOnASStandardContext which match the current context If true, deploy our context into the configured context |
protected java.util.List |
getContexts()
Gets all the contexts of the current Tomcat server |
java.lang.String |
getDefaultHost()
Return the Default host name of the web container. |
java.lang.String |
getDefaultHttpPort()
Return the Default HTTP port number of the web container. |
java.lang.String |
getDefaultHttpsPort()
Return the Default HTTPS port number of the web container (can be null if multiple HTTPS connector has been set). |
protected java.util.List |
getEngines()
Gets all the engines of the current Tomcat server |
protected void |
initCatalinaEnvironment()
Init the environment of catalina set catalina.home, catalina.base and unset the tomcat naming |
boolean |
isTomcatStarted()
The server is started ? |
void |
registerWarMBean(java.lang.String fileName)
Register a WAR by delegating the operation to the registerWar() method. |
void |
removeContext(org.apache.catalina.Context context)
Remove the specified Context from the set of defined Contexts for its associated Host. |
protected javax.naming.Context |
setGlobalNamingResources()
Defines the naming resources for tomcat only use for avoid null pointer when using a server.xml of the original distribution |
void |
setServer(org.apache.catalina.Server server)
Set the server instance we are configuring. |
void |
unRegisterWarMBean(java.lang.String fileName)
Unregister a WAR by delegating the operation to the unRegisterWar() method. |
protected void |
updateServerInfos()
Update info of the serverName and serverVersion |
| Methods inherited from class org.objectweb.jonas.web.AbsJWebContainerServiceImpl |
deployWars, getAutoloadDirectories, getClassLoader, getContextLinkedClassLoader, getCurrentNumberOfWars, getDeployableWars, getDeployedWars, getInstalledWars, getLogger, getMbeanServer, getNaming, getServerName, getServerVersion, getUnpackDir, getWar, getWarNames, getWebappsDirectory, isWarLoaded, removeCache, setServerName, setServerVersion, unDeployWars |
| Methods inherited from class org.objectweb.jonas.service.AbsServiceImpl |
getDomainName, getJonasServerName, getName, init, isStarted, setName, start, stop |
| Methods inherited from class org.objectweb.jonas.management.ReconfigDispatcher |
addNotificationListener, getFilter, getHandback, getListener, getNotificationInfo, initLogger, removeNotificationListener, sendReconfigNotification, sendSaveNotification |
| Methods inherited from class javax.management.NotificationBroadcasterSupport |
handleNotification, 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.objectweb.jonas.web.JWebContainerService |
deployWars, getClassLoader, getContextLinkedClassLoader, getWar, getWebappsDirectory, isWarLoaded, removeCache, unDeployWars |
| Methods inherited from interface org.objectweb.jonas.service.Service |
getName, init, isStarted, setName, start, stop |
| Field Detail |
protected static final java.lang.String CONFIG_FILE
| Constructor Detail |
public CatalinaJWebContainerServiceImpl()
| Method Detail |
protected void doInit(javax.naming.Context ctx)
throws ServiceException
doInit in class AbsJWebContainerServiceImplctx - the configuration context of the service.
ServiceException - if the initialization failed.
protected void initCatalinaEnvironment()
throws ServiceException
ServiceException - if catalina home is not set
public void doStart()
throws ServiceException
doStart in class AbsJWebContainerServiceImplServiceException - if the startup failed.
protected javax.naming.Context setGlobalNamingResources()
throws ServiceException
ServiceException - if a naming exception occurs
protected void doStop()
throws ServiceException
doStop in class AbsJWebContainerServiceImplServiceException - if the stop failed.
protected void doRegisterWar(javax.naming.Context ctx)
throws JWebContainerServiceException
doRegisterWar in class AbsJWebContainerServiceImplctx - the context which contains the configuration in order
to deploy the WAR.
JWebContainerServiceException - if the registration of the WAR
failed.
protected java.util.List getConfiguredMatchingJonasContexts(java.lang.String contextRoot,
java.io.File fpackedWar,
java.lang.String destDir)
contextRoot - name of the context that we want to find preconfigured contextsfpackedWar - file of the original war filedestDir - name of the unpacked directory of the war file
protected void checkStartedContext(org.apache.catalina.Context context,
PermissionManager permissionManager)
throws JWebContainerServiceException
context - context to checkpermissionManager - the permission manager used for JACC
JWebContainerServiceException - if the context was not right configured
protected java.util.List getEngines()
throws JWebContainerServiceException
JWebContainerServiceException - if engines can not be retrieved
protected java.util.List getContexts()
throws JWebContainerServiceException
JWebContainerServiceException - if contexts can not be retrieved
protected void doUnRegisterWar(javax.naming.Context ctx)
throws JWebContainerServiceException
doUnRegisterWar in class AbsJWebContainerServiceImplctx - the context which contains the configuration in order
to undeploy a WAR.
JWebContainerServiceException - if the unregistration failed.
public void removeContext(org.apache.catalina.Context context)
throws JWebContainerServiceException
context - The Context to be removed
JWebContainerServiceException - if the context can not be removedpublic boolean isTomcatStarted()
isTomcatStarted in interface CatalinaJWebContainerServicepublic void setServer(org.apache.catalina.Server server)
server - The new server
protected java.io.File getConfigFile()
throws java.io.FileNotFoundException
java.io.FileNotFoundException - if the configuration file is not found.
public org.apache.catalina.Host findHost(java.lang.String hostName)
throws JWebContainerServiceException
hostName - the name of the host to find.
JWebContainerServiceException - if the specified host cannot be
found.protected org.apache.tomcat.util.digester.Digester createServerDigester()
protected void updateServerInfos()
updateServerInfos in class AbsJWebContainerServiceImpl
public java.lang.String getDefaultHost()
throws JWebContainerServiceException
getDefaultHost in interface JWebContainerServicegetDefaultHost in class AbsJWebContainerServiceImplJWebContainerServiceException - when default host cannot
be resolved (multiple services).
public java.lang.String getDefaultHttpPort()
throws JWebContainerServiceException
getDefaultHttpPort in interface JWebContainerServicegetDefaultHttpPort in class AbsJWebContainerServiceImplJWebContainerServiceException - when default HTTP port cannot be
resolved or none are defined.
public java.lang.String getDefaultHttpsPort()
throws JWebContainerServiceException
getDefaultHttpsPort in interface JWebContainerServicegetDefaultHttpsPort in class AbsJWebContainerServiceImplJWebContainerServiceException - when default HTTPS port cannot be
resolved (0 occurences).
public void registerWarMBean(java.lang.String fileName)
throws java.rmi.RemoteException,
JWebContainerServiceException
registerWarMBean in interface JWebContainerServiceregisterWarMBean in class AbsJWebContainerServiceImplfileName - the name of the war to deploy.
java.rmi.RemoteException - if rmi call failed.
JWebContainerServiceException - if the registration failed.
public void unRegisterWarMBean(java.lang.String fileName)
throws java.rmi.RemoteException,
JWebContainerServiceException
unRegisterWarMBean in interface JWebContainerServiceunRegisterWarMBean in class AbsJWebContainerServiceImplfileName - the name of the war to undeploy.
java.rmi.RemoteException - if rmi call failed.
JWebContainerServiceException - if the unregistration failed.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||