|
|||||||||
| 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
public abstract class AbsJWebContainerServiceImpl
This abstract class provides an implementation for a dynamic JWebContainerService service.
| Nested Class Summary | |
|---|---|
class |
AbsJWebContainerServiceImpl.WebLoaderHolder
Holds the ClassLoader used to retrieve the WebApp JNDI Context and the JOnAS Webapp ClasLoader |
| Field Summary | |
|---|---|
static java.lang.String |
AUTOLOADDIR
Web service configuration properties : Autdeployed the files in these directories |
static java.lang.String |
CLASS
Web service configuration properties : Implementation of the web container |
static java.lang.String |
DESCRIPTORS
Web service configuration properties : Files deployed |
protected static java.lang.String |
INEAR_WORK_WEBAPPS_DIR_SUFFIX
The name of the property used in work directory for EAR webapps (in ear case). |
protected static java.lang.String |
JONAS_BASE
The name of the JONAS_BASE directory. |
static java.lang.String |
PARSINGWITHVALIDATION
Web service configuration properties : Xml parsing with validation |
protected static java.lang.String |
SINGLE_WORK_WEBAPPS_DIR_SUFFIX
The name of the property used in work directory for single webapps (not ear case). |
protected static java.lang.String |
WEBAPPS_DIR
The name of the webapps directory. |
protected static java.lang.String |
WORK_DIR
The name of the working directory. |
protected static java.lang.String |
WORK_WEBAPPS_DIR
The name of the working apps directory. |
| Fields inherited from class org.objectweb.jonas.management.ReconfigDispatcher |
|---|
RECONFIG_TYPE, SAVE_RECONFIG_TYPE |
| Constructor Summary | |
|---|---|
AbsJWebContainerServiceImpl()
|
|
| Method Summary | |
|---|---|
void |
deployWars(javax.naming.Context ctx)
Deploy the given wars of an ear file with the specified parent classloader (ejb classloader or ear classloader). |
protected void |
doInit(javax.naming.Context ctx)
Initialize the service. |
protected abstract void |
doRegisterWar(javax.naming.Context ctx)
Create the environment and delegate the operation to the implementation of the web container. |
protected void |
doStart()
Start the service. |
protected void |
doStop()
Stop the service. |
protected abstract void |
doUnRegisterWar(javax.naming.Context ctx)
Delegate the unregistration to the implementation of the web container. |
java.util.List |
getAutoloadDirectories()
Return the list of "autoload" directories for web applications. |
java.net.URLClassLoader |
getClassLoader(java.net.URL warURL,
java.lang.String earAppName,
java.lang.ClassLoader parentLoader)
Return the class loader of the given warURL. |
java.lang.ClassLoader |
getContextLinkedClassLoader(java.net.URL warURL)
|
java.lang.Integer |
getCurrentNumberOfWars()
|
abstract java.lang.String |
getDefaultHost()
Return the Default host name of the web container. |
abstract java.lang.String |
getDefaultHttpPort()
Return the Default HTTP port number of the web container (can be null if multiple HTTP connector has been set). |
abstract java.lang.String |
getDefaultHttpsPort()
Return the Default HTTPS port number of the web container (can be null if multiple HTTPS connector has been set). |
java.util.List |
getDeployableWars()
Return the list of installed web applications ready to deploy. |
java.util.List |
getDeployedWars()
Return the list of all loaded web applications. |
java.util.List |
getInstalledWars()
Return the list of installed web applications. |
protected static org.objectweb.util.monolog.api.Logger |
getLogger()
|
protected javax.management.MBeanServer |
getMbeanServer()
|
protected ContainerNaming |
getNaming()
|
java.lang.String |
getServerName()
Gets the name of the server which is the web container |
java.lang.String |
getServerVersion()
Gets the version of the server which is the web container |
protected java.net.URL |
getUnpackDir(java.net.URL warURL,
java.lang.String earAppName)
Return the URL where warURL has been unpacked. |
War |
getWar(java.net.URL url)
Get the war identified by its URL (.war). |
java.util.Set |
getWarNames()
This method is added temporarily. |
java.lang.String |
getWebappsDirectory()
Return the WebApps directory. |
boolean |
isWarLoaded(java.lang.String fileName)
Test if the specified filename is already deployed or not |
void |
registerWarMBean(java.lang.String fileName)
Register a WAR by delegating the operation to the registerWar() method. |
void |
removeCache(java.lang.ClassLoader earClassLoader)
Make a cleanup of the cache of deployment descriptor. |
protected void |
setServerName(java.lang.String serverName)
|
protected void |
setServerVersion(java.lang.String serverVersion)
|
void |
unDeployWars(java.net.URL[] urls)
Undeploy the given wars of an ear file with the specified parent classloader (ejb classloader or ear classloader). |
void |
unRegisterWarMBean(java.lang.String fileName)
Unregister a WAR by delegating the operation to the unRegisterWar() method. |
protected abstract void |
updateServerInfos()
Update info of the serverName and serverVersion |
| 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.service.Service |
|---|
getName, init, isStarted, setName, start, stop |
| Field Detail |
|---|
protected static final java.lang.String JONAS_BASE
protected static final java.lang.String WEBAPPS_DIR
protected static final java.lang.String WORK_DIR
protected static final java.lang.String WORK_WEBAPPS_DIR
protected static final java.lang.String SINGLE_WORK_WEBAPPS_DIR_SUFFIX
protected static final java.lang.String INEAR_WORK_WEBAPPS_DIR_SUFFIX
public static final java.lang.String DESCRIPTORS
public static final java.lang.String AUTOLOADDIR
public static final java.lang.String PARSINGWITHVALIDATION
public static final java.lang.String CLASS
| Constructor Detail |
|---|
public AbsJWebContainerServiceImpl()
| Method Detail |
|---|
protected void doInit(javax.naming.Context ctx)
throws ServiceException
doInit in class AbsServiceImplctx - the configuration context of the service.
ServiceException - if the initialization failed.
protected void doStart()
throws ServiceException
doStart in class AbsServiceImplServiceException - if the startup failed.
protected void doStop()
throws ServiceException
doStop in class AbsServiceImplServiceException - if the stop failed.
protected abstract void doRegisterWar(javax.naming.Context ctx)
throws JWebContainerServiceException
ctx - the context which contains the configuration in order to
deploy a WAR.
JWebContainerServiceException - if the registration of the WAR
failed.
protected abstract void doUnRegisterWar(javax.naming.Context ctx)
throws JWebContainerServiceException
ctx - the context which contains the configuration in order to
undeploy a WAR.
JWebContainerServiceException - if the unregistration failed.
protected java.net.URL getUnpackDir(java.net.URL warURL,
java.lang.String earAppName)
throws JWebContainerServiceException
warURL - the URL of the warearAppName - EAR Application name (can be null if not in EAR case)
JWebContainerServiceException - when it is impossible to retrieve
the unpacked URL.
public java.net.URLClassLoader getClassLoader(java.net.URL warURL,
java.lang.String earAppName,
java.lang.ClassLoader parentLoader)
throws JWebContainerServiceException
getClassLoader in interface JWebContainerServicewarURL - the url of the war we want to get the loaderearAppName - the name of the ear application containing the war. May
be null in non ear case.parentLoader - the ejb class loader of the ear. May be null in non
ear case.
JWebContainerServiceException - if the process failed.public java.lang.ClassLoader getContextLinkedClassLoader(java.net.URL warURL)
getContextLinkedClassLoader in interface JWebContainerServicewarURL - the URL of the webapp
public void registerWarMBean(java.lang.String fileName)
throws java.rmi.RemoteException,
JWebContainerServiceException
registerWarMBean in interface AbsJWebContainerServiceImplMBeanregisterWarMBean in interface JWebContainerServicefileName - 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 AbsJWebContainerServiceImplMBeanunRegisterWarMBean in interface JWebContainerServicefileName - the name of the war to undeploy.
java.rmi.RemoteException - if rmi call failed.
JWebContainerServiceException - if the unregistration failed.
public void deployWars(javax.naming.Context ctx)
throws JWebContainerServiceException
deployWars in interface JWebContainerServicectx - the context containing the configuration to deploy the wars.
JWebContainerServiceException - if an error occurs during the
deployment.public void unDeployWars(java.net.URL[] urls)
unDeployWars in interface JWebContainerServiceurls - the list of the urls of the wars to undeploy.public War getWar(java.net.URL url)
getWar in interface JWebContainerServiceurl - the URL of the war to get.
public void removeCache(java.lang.ClassLoader earClassLoader)
removeCache in interface JWebContainerServiceearClassLoader - the ClassLoader of the ear application to remove
from the cache.public java.lang.Integer getCurrentNumberOfWars()
getCurrentNumberOfWars in interface AbsJWebContainerServiceImplMBean
public java.util.List getInstalledWars()
throws java.lang.Exception
getInstalledWars in interface AbsJWebContainerServiceImplMBeanjava.lang.Exception - if the list can't be retrievedpublic java.util.Set getWarNames()
getWarNames in interface AbsJWebContainerServiceImplMBeanpublic boolean isWarLoaded(java.lang.String fileName)
isWarLoaded in interface AbsJWebContainerServiceImplMBeanisWarLoaded in interface JWebContainerServicefileName - the name of the war file.
public java.util.List getDeployedWars()
getDeployedWars in interface AbsJWebContainerServiceImplMBean
public java.util.List getDeployableWars()
throws java.lang.Exception
getDeployableWars in interface AbsJWebContainerServiceImplMBeanjava.lang.Exception - if the list can't be retrievedpublic java.util.List getAutoloadDirectories()
getAutoloadDirectories in interface AbsJWebContainerServiceImplMBeanpublic java.lang.String getWebappsDirectory()
getWebappsDirectory in interface AbsJWebContainerServiceImplMBeangetWebappsDirectory in interface JWebContainerServicepublic java.lang.String getServerName()
getServerName in interface AbsJWebContainerServiceImplMBeanpublic java.lang.String getServerVersion()
getServerVersion in interface AbsJWebContainerServiceImplMBeanprotected abstract void updateServerInfos()
public abstract java.lang.String getDefaultHost()
throws JWebContainerServiceException
getDefaultHost in interface JWebContainerServiceJWebContainerServiceException - when it is impossible to get the
Default Host.
public abstract java.lang.String getDefaultHttpPort()
throws JWebContainerServiceException
getDefaultHttpPort in interface JWebContainerServiceJWebContainerServiceException - when it is impossible to get the
Default Http port.
public abstract java.lang.String getDefaultHttpsPort()
throws JWebContainerServiceException
getDefaultHttpsPort in interface JWebContainerServiceJWebContainerServiceException - when it is impossible to get the
Default Https port.protected static org.objectweb.util.monolog.api.Logger getLogger()
protected ContainerNaming getNaming()
protected javax.management.MBeanServer getMbeanServer()
protected void setServerName(java.lang.String serverName)
serverName - The serverName to set.protected void setServerVersion(java.lang.String serverVersion)
serverVersion - The serverVersion to set.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||