org.objectweb.jonas.web.wrapper.CatalinaJWebContainerServiceWrapper Class Reference

Inherits org.objectweb.jonas.web.wrapper.CatalinaJWebContainerService, and org.objectweb.jonas.web.AbsJWebContainerServiceImplMBean.

Inheritance diagram for org.objectweb.jonas.web.wrapper.CatalinaJWebContainerServiceWrapper:

Inheritance graph
[legend]
Collaboration diagram for org.objectweb.jonas.web.wrapper.CatalinaJWebContainerServiceWrapper:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 CatalinaJWebContainerServiceWrapper () throws ServiceException
void deployWars (Context ctx) throws JWebContainerServiceException
War getWar (URL url)
void unDeployWars (URL[] urls)
void removeCache (ClassLoader earClassLoader)
void registerWarMBean (String fileName) throws RemoteException, JWebContainerServiceException
void unRegisterWarMBean (String fileName) throws RemoteException, JWebContainerServiceException
List getInstalledWars () throws Exception
Integer getCurrentNumberOfWars ()
Set getWarNames ()
boolean isWarLoaded (String fileName)
String getServerName ()
String getServerVersion ()
List getDeployedWars ()
List getDeployableWars () throws Exception
List getAutoloadDirectories ()
String getWebappsDirectory ()
void init (Context ctx) throws ServiceException
void start () throws ServiceException
void stop () throws ServiceException
boolean isStarted ()
void setName (String name)
String getName ()
String getDefaultHost () throws JWebContainerServiceException
String getDefaultHttpPort () throws JWebContainerServiceException
String getDefaultHttpsPort () throws JWebContainerServiceException
URLClassLoader getClassLoader (URL warURL, String earAppName, ClassLoader parentLoader) throws JWebContainerServiceException
boolean isTomcatStarted ()
ClassLoader getContextLinkedClassLoader (URL url)

Detailed Description

Wrap the Catalina 5.0 Web Container Service because Catalina use Digester to parse its server.xml

Author:
Guillaume Sauthier

Definition at line 51 of file CatalinaJWebContainerServiceWrapper.java.


Constructor & Destructor Documentation

org.objectweb.jonas.web.wrapper.CatalinaJWebContainerServiceWrapper.CatalinaJWebContainerServiceWrapper  )  throws ServiceException
 

Construct the instance and init the service.

Exceptions:
ServiceException when Catalina Loader cannot be found

Definition at line 77 of file CatalinaJWebContainerServiceWrapper.java.

References org.objectweb.jonas.server.LoaderManager.getCatalinaLoader().

Here is the call graph for this function:


Member Function Documentation

void org.objectweb.jonas.web.wrapper.CatalinaJWebContainerServiceWrapper.deployWars Context  ctx  )  throws JWebContainerServiceException
 

Deploy the given wars of an ear file with the specified parent classloader (ejb classloader or ear classloader). (This method is only used for the ear applications, not for the web applications).

Parameters:
ctx the context containing the configuration to deploy the wars.
This context contains the following parameters :
  • urls the list of the urls of the wars to deploy.
  • earURL the URL of the ear application file.
  • parentClassLoader the parent classLoader of the wars.
  • earClassLoader the ear classLoader of the j2ee app.
  • altDDs the optional URI of deployment descriptor.
  • contextRoots the optional context root of the wars.
Exceptions:
JWebContainerServiceException if an error occurs during the deployment.

Implements org.objectweb.jonas.web.JWebContainerService.

Definition at line 110 of file CatalinaJWebContainerServiceWrapper.java.

List org.objectweb.jonas.web.wrapper.CatalinaJWebContainerServiceWrapper.getAutoloadDirectories  ) 
 

Return the list of "autoload" directories for web applications.

Returns:
The list of all "autoload" directories

Implements org.objectweb.jonas.web.AbsJWebContainerServiceImplMBean.

Definition at line 456 of file CatalinaJWebContainerServiceWrapper.java.

URLClassLoader org.objectweb.jonas.web.wrapper.CatalinaJWebContainerServiceWrapper.getClassLoader URL  warURL,
String  earAppName,
ClassLoader  parentLoader
throws JWebContainerServiceException
 

Return the class loader of the given warURL. Unpack the associated war and build the loader if it's not in the cache.

Parameters:
warURL the url of the war we want to get the loader
earAppName 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.
Returns:
the class loader of the given warURL.
Exceptions:
JWebContainerServiceException if the process failed.

Implements org.objectweb.jonas.web.JWebContainerService.

Definition at line 678 of file CatalinaJWebContainerServiceWrapper.java.

ClassLoader org.objectweb.jonas.web.wrapper.CatalinaJWebContainerServiceWrapper.getContextLinkedClassLoader URL  url  ) 
 

Parameters:
url the URL of the webapp
Returns:
Returns the ClassLoader used to link a JNDI environnment to a webapp

Implements org.objectweb.jonas.web.JWebContainerService.

Definition at line 716 of file CatalinaJWebContainerServiceWrapper.java.

Integer org.objectweb.jonas.web.wrapper.CatalinaJWebContainerServiceWrapper.getCurrentNumberOfWars  ) 
 

Returns:
current number of wars deployed in the JOnAS server

Implements org.objectweb.jonas.web.AbsJWebContainerServiceImplMBean.

Definition at line 318 of file CatalinaJWebContainerServiceWrapper.java.

String org.objectweb.jonas.web.wrapper.CatalinaJWebContainerServiceWrapper.getDefaultHost  )  throws JWebContainerServiceException
 

Return the Default host name of the web container.

Returns:
the Default host name of the web container.
Exceptions:
JWebContainerServiceException when it is impossible to get the Default Host.

Implements org.objectweb.jonas.web.JWebContainerService.

Definition at line 610 of file CatalinaJWebContainerServiceWrapper.java.

String org.objectweb.jonas.web.wrapper.CatalinaJWebContainerServiceWrapper.getDefaultHttpPort  )  throws JWebContainerServiceException
 

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 it is impossible to get the Default Http port.

Implements org.objectweb.jonas.web.JWebContainerService.

Definition at line 631 of file CatalinaJWebContainerServiceWrapper.java.

String org.objectweb.jonas.web.wrapper.CatalinaJWebContainerServiceWrapper.getDefaultHttpsPort  )  throws JWebContainerServiceException
 

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 it is impossible to get the Default Https port.

Implements org.objectweb.jonas.web.JWebContainerService.

Definition at line 652 of file CatalinaJWebContainerServiceWrapper.java.

List org.objectweb.jonas.web.wrapper.CatalinaJWebContainerServiceWrapper.getDeployableWars  )  throws Exception
 

Return the list of installed web applications ready to deploy.

Returns:
The list of deployable web applications
Exceptions:
Exception if the list can't be retrieved

Implements org.objectweb.jonas.web.AbsJWebContainerServiceImplMBean.

Definition at line 437 of file CatalinaJWebContainerServiceWrapper.java.

List org.objectweb.jonas.web.wrapper.CatalinaJWebContainerServiceWrapper.getDeployedWars  ) 
 

Return the list of all loaded web applications.

Returns:
The list of deployed web applications

Implements org.objectweb.jonas.web.AbsJWebContainerServiceImplMBean.

Definition at line 416 of file CatalinaJWebContainerServiceWrapper.java.

List org.objectweb.jonas.web.wrapper.CatalinaJWebContainerServiceWrapper.getInstalledWars  )  throws Exception
 

Return the list of installed web applications. The WAR files or the directories with expanded web application are searched in JONAS_BASE/webapps and all webapps directories 'autoload'.

Returns:
The list of WAR files or the directories with expanded web application found
Exceptions:
Exception if the list can't be retrieved

Implements org.objectweb.jonas.web.AbsJWebContainerServiceImplMBean.

Definition at line 300 of file CatalinaJWebContainerServiceWrapper.java.

String org.objectweb.jonas.web.wrapper.CatalinaJWebContainerServiceWrapper.getName  ) 
 

Returns:
the service's name

Definition at line 590 of file CatalinaJWebContainerServiceWrapper.java.

String org.objectweb.jonas.web.wrapper.CatalinaJWebContainerServiceWrapper.getServerName  ) 
 

Gets the name of the server which is the web container

Returns:
the name of the server which is the web container

Implements org.objectweb.jonas.web.AbsJWebContainerServiceImplMBean.

Definition at line 377 of file CatalinaJWebContainerServiceWrapper.java.

String org.objectweb.jonas.web.wrapper.CatalinaJWebContainerServiceWrapper.getServerVersion  ) 
 

Gets the version of the server which is the web container

Returns:
the version of the server which is the web container

Implements org.objectweb.jonas.web.AbsJWebContainerServiceImplMBean.

Definition at line 396 of file CatalinaJWebContainerServiceWrapper.java.

War org.objectweb.jonas.web.wrapper.CatalinaJWebContainerServiceWrapper.getWar URL  url  ) 
 

Get the war identified by its URL (.war).

Parameters:
url the URL of the war to get.
Returns:
the war indentified by its URL, or null if the war is not found.

Implements org.objectweb.jonas.web.JWebContainerService.

Definition at line 130 of file CatalinaJWebContainerServiceWrapper.java.

Set org.objectweb.jonas.web.wrapper.CatalinaJWebContainerServiceWrapper.getWarNames  ) 
 

This method is added temporarily. It will disapear when Wars will have their associated MBeans (when Wars will become manageable)

Returns:
the names of the wars currently deployed in the JOnAS server

Implements org.objectweb.jonas.web.AbsJWebContainerServiceImplMBean.

Definition at line 338 of file CatalinaJWebContainerServiceWrapper.java.

String org.objectweb.jonas.web.wrapper.CatalinaJWebContainerServiceWrapper.getWebappsDirectory  ) 
 

Return the WebApps directory.

Returns:
The WebApps directory

Implements org.objectweb.jonas.web.AbsJWebContainerServiceImplMBean.

Definition at line 475 of file CatalinaJWebContainerServiceWrapper.java.

void org.objectweb.jonas.web.wrapper.CatalinaJWebContainerServiceWrapper.init Context  ctx  )  throws ServiceException
 

Initialize the Catalina service.

Parameters:
ctx the configuration context of the service.
Exceptions:
ServiceException if the initialization failed.
See also:
org.objectweb.jonas.service.Service.init(javax.naming.Context)

Definition at line 496 of file CatalinaJWebContainerServiceWrapper.java.

boolean org.objectweb.jonas.web.wrapper.CatalinaJWebContainerServiceWrapper.isStarted  ) 
 

Returns:
true if the service is started, false otherwise

Definition at line 553 of file CatalinaJWebContainerServiceWrapper.java.

boolean org.objectweb.jonas.web.wrapper.CatalinaJWebContainerServiceWrapper.isTomcatStarted  ) 
 

The server is started ?

Returns:
boolean true if the catalina container is running.

Implements org.objectweb.jonas.web.wrapper.CatalinaJWebContainerService.

Definition at line 697 of file CatalinaJWebContainerServiceWrapper.java.

boolean org.objectweb.jonas.web.wrapper.CatalinaJWebContainerServiceWrapper.isWarLoaded String  fileName  ) 
 

Test if the specified filename is already deployed or not

Parameters:
fileName the name of the war file.
Returns:
true if the war is deployed, else false.

Implements org.objectweb.jonas.web.AbsJWebContainerServiceImplMBean.

Definition at line 358 of file CatalinaJWebContainerServiceWrapper.java.

void org.objectweb.jonas.web.wrapper.CatalinaJWebContainerServiceWrapper.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.

Implements org.objectweb.jonas.web.AbsJWebContainerServiceImplMBean.

Definition at line 256 of file CatalinaJWebContainerServiceWrapper.java.

void org.objectweb.jonas.web.wrapper.CatalinaJWebContainerServiceWrapper.removeCache ClassLoader  earClassLoader  ) 
 

Make a cleanup of the cache of deployment descriptor. This method must be invoked after the ear deployment by the EAR service.

Parameters:
earClassLoader the ClassLoader of the ear application to remove from the cache.

Implements org.objectweb.jonas.web.JWebContainerService.

Definition at line 234 of file CatalinaJWebContainerServiceWrapper.java.

void org.objectweb.jonas.web.wrapper.CatalinaJWebContainerServiceWrapper.setName String  name  ) 
 

Set the service's name

Parameters:
name to set

Definition at line 572 of file CatalinaJWebContainerServiceWrapper.java.

void org.objectweb.jonas.web.wrapper.CatalinaJWebContainerServiceWrapper.start  )  throws ServiceException
 

Start the Catalina service in a new thread

Exceptions:
ServiceException if the startup failed.
See also:
org.objectweb.jonas.service.Service.start()

Definition at line 516 of file CatalinaJWebContainerServiceWrapper.java.

void org.objectweb.jonas.web.wrapper.CatalinaJWebContainerServiceWrapper.stop  )  throws ServiceException
 

Stop the Catalina service.

Exceptions:
ServiceException if the stop failed.
See also:
org.objectweb.jonas.service.Service.stop()

Definition at line 535 of file CatalinaJWebContainerServiceWrapper.java.

void org.objectweb.jonas.web.wrapper.CatalinaJWebContainerServiceWrapper.unDeployWars URL[]  urls  ) 
 

Undeploy the given wars of an ear file with the specified parent classloader (ejb classloader or ear classloader). (This method is only used for the ear applications, not for the war applications).

Parameters:
urls the list of the urls of the wars to undeploy.

Implements org.objectweb.jonas.web.JWebContainerService.

Definition at line 213 of file CatalinaJWebContainerServiceWrapper.java.

void org.objectweb.jonas.web.wrapper.CatalinaJWebContainerServiceWrapper.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.

Implements org.objectweb.jonas.web.AbsJWebContainerServiceImplMBean.

Definition at line 278 of file CatalinaJWebContainerServiceWrapper.java.


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