org.objectweb.jonas.service.ServiceManager Class Reference

Collaboration diagram for org.objectweb.jonas.service.ServiceManager:

Collaboration graph
[legend]
List of all members.

Public Member Functions

Service getService (String name) throws ServiceException
Service getEjbService () throws ServiceException
Service getEarService () throws ServiceException
Service getRarService () throws ServiceException
Service getWebContainerService () throws ServiceException
Service getWebServicesService () throws ServiceException
Service getMailService () throws ServiceException
Service getDataBaseService () throws ServiceException
Service getTransactionService () throws ServiceException
Service getJmsService () throws ServiceException
Service getSecurityService () throws ServiceException
Service getJmxService () throws ServiceException
Service getRegistryService () throws ServiceException
Service getResourceService () throws ServiceException
void startRegistry () throws ServiceException
void startJmx () throws ServiceException
void startServices () throws ServiceException
Service[] getServices () throws ServiceException
String[] getServiceNames ()
void stopServices () throws ServiceException

Static Public Member Functions

ServiceManager getInstance () throws Exception

Protected Member Functions

void readServices () throws ServiceException
Service createServiceFrom (String serviceName) throws ServiceException
Context createServiceContextFor (String serviceName) throws NamingException

Static Package Attributes

final String SERVICES_PROP_NAME = JProp.JONASPREFIX + ".services"
final String PREFIX_SERVICE_PROP_NAME = JProp.JONASPREFIX + ".service"

Detailed Description

This class implements a manager of org.objectweb.jonas.service.Service for JOnAS.

The services are defined in the jonas.properties files

Author:
Helene Joanin Contributor(s): 01/06/15: Regis Le Brettevillois - Libelis 02/06 : Florent Benoit & Ludovic Bert : Ear service/Web Container service Philippe Durieux 03/01/14 Adriana Danes : pass the entire property name (jonas.service.<service-name>.XXXX) in the configuration context at service creation time

Definition at line 65 of file ServiceManager.java.


Member Function Documentation

Context org.objectweb.jonas.service.ServiceManager.createServiceContextFor String  serviceName  )  throws NamingException [protected]
 

Creates and returns the context for the configuration of the service which have the given name. (Uses the 'jonas.service.<servicename>.XXXX' properties for that)

Parameters:
serviceName the name of the service to obtain the configuration.
Returns:
Context the context for the service.
Exceptions:
NamingException if the context can't be built.

Definition at line 452 of file ServiceManager.java.

References org.objectweb.jonas.common.JProp.getEnv(), org.objectweb.jonas.common.JProp.getValue(), and org.objectweb.jonas.naming.CompNamingContext.rebind().

Here is the call graph for this function:

Service org.objectweb.jonas.service.ServiceManager.createServiceFrom String  serviceName  )  throws ServiceException [protected]
 

Creates and returns the service which have the given name. (Uses the 'jonas.service.<servicename>.class' property for that)

Parameters:
serviceName the name of the service to instanciate.
Returns:
Service the instance of the service.
Exceptions:
ServiceException if the service can't be created.

Definition at line 407 of file ServiceManager.java.

References org.objectweb.jonas.common.JProp.getValue(), and org.objectweb.jonas.service.Service.setName().

Here is the call graph for this function:

Service org.objectweb.jonas.service.ServiceManager.getDataBaseService  )  throws ServiceException
 

Return the DataBase service (service's name: 'dbm')

Returns:
the DBM service.
Exceptions:
ServiceException if can not get the dbm service.

Definition at line 208 of file ServiceManager.java.

Referenced by org.objectweb.jonas.container.EJB.getAllDataSourceName().

Service org.objectweb.jonas.service.ServiceManager.getEarService  )  throws ServiceException
 

Return the Ear service (service's name: 'ear')

Returns:
the EAR service.
Exceptions:
ServiceException if can not get the ear service.

Definition at line 163 of file ServiceManager.java.

Referenced by org.objectweb.jonas.server.J2EEServerMBean.deployFile(), and org.objectweb.jonas_lib.deployment.work.EarCleanTask.isDeployLogEntry().

Service org.objectweb.jonas.service.ServiceManager.getEjbService  )  throws ServiceException
 

Return the EJB service (service's name: 'ejb')

Returns:
the EJB service.
Exceptions:
ServiceException if can not get the ejb service.

Definition at line 154 of file ServiceManager.java.

Referenced by org.objectweb.jonas.server.J2EEServerMBean.deployFile(), org.objectweb.jonas.ear.EarServiceImpl.doInit(), org.objectweb.jonas_lib.deployment.work.JarCleanTask.isDeployLogEntry(), and org.objectweb.jonas.server.Server.start().

ServiceManager org.objectweb.jonas.service.ServiceManager.getInstance  )  throws Exception [static]
 

Get the unique instance. Create it at first call.

Returns:
ServiceManager the unique instance
Exceptions:
Exception if the ServiceManager can't be built.

Definition at line 125 of file ServiceManager.java.

Referenced by org.objectweb.jonas.server.J2EEServerMBean.deployFile(), org.objectweb.jonas.web.AbsJWebContainerServiceImpl.doInit(), org.objectweb.jonas.ear.EarServiceImpl.doInit(), org.objectweb.jonas.container.EJBServiceImpl.doInit(), org.objectweb.jonas.web.jetty50.JettyJWebContainerServiceImpl.doStart(), org.objectweb.jonas.web.jetty50.JettyJWebContainerServiceImpl.doStop(), org.objectweb.jonas.adm.Adm.getTopicLevel(), org.objectweb.jonas.adm.Adm.getTopics(), org.objectweb.jonas_lib.deployment.work.JarCleanTask.isDeployLogEntry(), org.objectweb.jonas_lib.deployment.work.EarCleanTask.isDeployLogEntry(), org.objectweb.jonas.adm.Adm.setTopicLevel(), and org.objectweb.jonas.server.Server.start().

Service org.objectweb.jonas.service.ServiceManager.getJmsService  )  throws ServiceException
 

Return the JMS service (service's name: 'jms')

Returns:
the JMS service.
Exceptions:
ServiceException if can not get the jms service.

Definition at line 226 of file ServiceManager.java.

Referenced by org.objectweb.jonas.container.EJBServiceImpl.doInit().

Service org.objectweb.jonas.service.ServiceManager.getJmxService  )  throws ServiceException
 

Return the JMX service (service's name: 'jmx')

Returns:
the JMX service.
Exceptions:
ServiceException if can not get the jmx service.

Definition at line 244 of file ServiceManager.java.

Referenced by org.objectweb.jonas.web.AbsJWebContainerServiceImpl.doInit(), org.objectweb.jonas.ear.EarServiceImpl.doInit(), org.objectweb.jonas.container.EJBServiceImpl.doInit(), org.objectweb.jonas.web.jetty50.JettyJWebContainerServiceImpl.doStart(), org.objectweb.jonas.web.jetty50.JettyJWebContainerServiceImpl.doStop(), and org.objectweb.jonas.security.realm.factory.JResource.JResource().

Service org.objectweb.jonas.service.ServiceManager.getMailService  )  throws ServiceException
 

Return the mail service (service's name: 'mail').

Returns:
the mail service.
Exceptions:
ServiceException if can not get the mail service.

Definition at line 199 of file ServiceManager.java.

Referenced by org.objectweb.jonas.container.EJB.getAllMailFactoryMName(), and org.objectweb.jonas.container.EJB.getAllMailFactorySName().

Service org.objectweb.jonas.service.ServiceManager.getRarService  )  throws ServiceException
 

Return the Rar service (service's name: 'resource')

Returns:
the RAR service.
Exceptions:
ServiceException if can not get the rar service.

Definition at line 172 of file ServiceManager.java.

Service org.objectweb.jonas.service.ServiceManager.getRegistryService  )  throws ServiceException
 

Return the Registry service (service's name: 'registry')

Returns:
the Registry service.
Exceptions:
ServiceException if can not get the registry service.

Definition at line 253 of file ServiceManager.java.

Service org.objectweb.jonas.service.ServiceManager.getResourceService  )  throws ServiceException
 

Return the Resource service (service's name: 'resource')

Returns:
the Resource service.
Exceptions:
ServiceException if can not get the resource service.

Definition at line 262 of file ServiceManager.java.

Referenced by org.objectweb.jonas.server.J2EEServerMBean.deployFile(), and org.objectweb.jonas.ear.EarServiceImpl.doInit().

Service org.objectweb.jonas.service.ServiceManager.getSecurityService  )  throws ServiceException
 

Return the Security service (service's name: 'security')

Returns:
the Security service.
Exceptions:
ServiceException if can not get the security service.

Definition at line 235 of file ServiceManager.java.

Referenced by org.objectweb.jonas.container.EJBServiceImpl.doInit(), and org.objectweb.jonas.security.realm.factory.JResource.JResource().

Service org.objectweb.jonas.service.ServiceManager.getService String  name  )  throws ServiceException
 

Get the service which have the given name

Parameters:
name the given name
Returns:
the service which have the given name
Exceptions:
ServiceException if the service can't be retrieved.

Definition at line 138 of file ServiceManager.java.

String [] org.objectweb.jonas.service.ServiceManager.getServiceNames  ) 
 

return the list of services + registry if needed.

Returns:
String[] the name of the services.

Definition at line 338 of file ServiceManager.java.

References org.objectweb.jonas.common.JProp.getValueAsArray().

Here is the call graph for this function:

Service [] org.objectweb.jonas.service.ServiceManager.getServices  )  throws ServiceException
 

Returns the list of the managed services

Returns:
String[] the name of the managed services.
Exceptions:
ServiceException if the list can't be retrieved.

Definition at line 326 of file ServiceManager.java.

Service org.objectweb.jonas.service.ServiceManager.getTransactionService  )  throws ServiceException
 

Return the Transaction service (service's name: 'jtm')

Returns:
the JTM service.
Exceptions:
ServiceException if can not get the jtm service.

Definition at line 217 of file ServiceManager.java.

Referenced by org.objectweb.jonas.dbm.ConnectionManager.ConnectionManager(), org.objectweb.jonas.resource.Rar.createFactory(), org.objectweb.jonas.resource.ResourceServiceImpl.doInit(), org.objectweb.jonas.container.EJBServiceImpl.doInit(), org.objectweb.jonas.dbm.Pool.Pool(), org.objectweb.jonas.resource.Rar.Rar(), and org.objectweb.jonas.server.Server.start().

Service org.objectweb.jonas.service.ServiceManager.getWebContainerService  )  throws ServiceException
 

Return the web service (service's name: 'web').

Returns:
the web service.
Exceptions:
ServiceException if can not get the web service.

Definition at line 181 of file ServiceManager.java.

Referenced by org.objectweb.jonas.server.J2EEServerMBean.deployFile(), and org.objectweb.jonas.ear.EarServiceImpl.doInit().

Service org.objectweb.jonas.service.ServiceManager.getWebServicesService  )  throws ServiceException
 

Return the WebServices service (service's name: 'ws').

Returns:
the WebServices service.
Exceptions:
ServiceException if can not get the WebServices service.

Definition at line 190 of file ServiceManager.java.

Referenced by org.objectweb.jonas.web.AbsJWebContainerServiceImpl.doInit(), and org.objectweb.jonas.ear.EarServiceImpl.doInit().

void org.objectweb.jonas.service.ServiceManager.readServices  )  throws ServiceException [protected]
 

For each service, create it and its associated configuration context. (creates services, contextsByService and servicesByName)

Exceptions:
ServiceException if the services can't be read.

Definition at line 371 of file ServiceManager.java.

void org.objectweb.jonas.service.ServiceManager.startJmx  )  throws ServiceException
 

Start the jmx service

Exceptions:
ServiceException if the jmx service can't be started.

Definition at line 286 of file ServiceManager.java.

References org.objectweb.jonas.service.Service.init(), and org.objectweb.jonas.service.Service.start().

Referenced by org.objectweb.jonas.server.Server.start().

Here is the call graph for this function:

void org.objectweb.jonas.service.ServiceManager.startRegistry  )  throws ServiceException
 

Start the mandatory "registry" service

Exceptions:
ServiceException if the "registry" service can't be started.

Definition at line 270 of file ServiceManager.java.

References org.objectweb.jonas.service.Service.init(), and org.objectweb.jonas.service.Service.start().

Referenced by org.objectweb.jonas.server.Server.start().

Here is the call graph for this function:

void org.objectweb.jonas.service.ServiceManager.startServices  )  throws ServiceException
 

Starts the managed services.

Exceptions:
ServiceException if the services can't be started.

Definition at line 302 of file ServiceManager.java.

References org.objectweb.jonas.service.Service.getName(), org.objectweb.jonas.service.Service.init(), and org.objectweb.jonas.service.Service.start().

Referenced by org.objectweb.jonas.server.Server.start().

Here is the call graph for this function:

void org.objectweb.jonas.service.ServiceManager.stopServices  )  throws ServiceException
 

Management Method: Stop all services. The services are stopped in the reverse order of their starting. (Continue the processing of stopping for the others services, even if there is a problem for one service.)

Exceptions:
ServiceException if the service can't be stopped.

Definition at line 487 of file ServiceManager.java.

References org.objectweb.jonas.service.Service.getName(), org.objectweb.jonas.service.Service.isStarted(), and org.objectweb.jonas.service.Service.stop().

Here is the call graph for this function:


Member Data Documentation

final String org.objectweb.jonas.service.ServiceManager.PREFIX_SERVICE_PROP_NAME = JProp.JONASPREFIX + ".service" [static, package]
 

A JOnAS service

Definition at line 75 of file ServiceManager.java.

final String org.objectweb.jonas.service.ServiceManager.SERVICES_PROP_NAME = JProp.JONASPREFIX + ".services" [static, package]
 

Services of JOnAS

Definition at line 70 of file ServiceManager.java.


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