JCA resource service implmentation
author: Philippe Coq author: Contributor(s): author: JOnAS 2.4 Sebastien Chassande-Barrioz (sebastien.chassande@inrialpes.fr) author: JOnAS 3.0 Eric Hardesty (Eric.Hardesty@bull.com) author: JOnAS 4.0 Adriana Danes (JSR 77 + use of Jakarta Modeler Component : http://jakarta.apache.org/commons/modeler) author: Eric Hardesty (J2CA 1.5)
deployRarMBean(String fileName) Deploy an RAR by delegating the operation to the createResourceAdapter method.
This is used for JMX management.
Parameters: fileName - the fileName of the rar which must be be deployed.
public void
deployRars(Context ctx) Deploy the given rars of an ear file with the specified parent
classloader (ear classloader).
public void
doInit(Context ctx) - Get the loggers
- Get the global jndi context
- Get the list of the resource adapters.
getJDBCResourceAdapater(String jndiName) Return the JDBC ResourceAdapter MBean OBJECT_NAME deployed in the current server
haveing the 'jndiName' attribue value equal to the given jndiName
Parameters: jndiName - A DataSource jndi name we are looking for.
Create a new resource adapter. This Resource Adapter is configured via
xml files in the rar file
Parameters: ctx - Context to use for deploying an RAR Sting resource objectName throws: Exception - error encountered
Deploy the resource adapter
Parameters: fileName - the name of the rar file. throws: Exception - if unable to deploy the rar String ObjectName of the deployed rar
Deploy an RAR by delegating the operation to the createResourceAdapter method.
This is used for JMX management.
Parameters: fileName - the fileName of the rar which must be be deployed. The ObjectName of the MBean associated to the deployed J2EE Application throws: RemoteException - if rmi call failed. throws: ResourceServiceException - if the deployment of the RAR failed.
Deploy the given rars of an ear file with the specified parent
classloader (ear classloader). (This method is only used for
for ear applications).
Parameters: ctx - the context containing the configurationto deploy the rars. This context contains the following parameters : - urls the list of the urls of the rars to deploy. - earRootURL the URL of the ear application file. - earClassLoader the ear classLoader of the j2ee app. - altDDs the optional URI of deployment descriptor.
- Get the loggers
- Get the global jndi context
- Get the list of the resource adapters. The list is reachable in the
- context parameter under the name RESOURCE_LIST.
- Get the transaction manager into the jndi
- Set the XML validation property
Parameters: ctx - Context
Return the list of installed RAR containers.
The RAR files or the directories with expanded RAR container are searched
in JONAS_BASE/rars and all rar directories 'autoload'.
The list of RAR files or the directories with expanded RAR container found throws: Exception - if the list can't be retrieved
Return the JDBC ResourceAdapter MBean OBJECT_NAME deployed in the current server
haveing the 'jndiName' attribue value equal to the given jndiName
Parameters: jndiName - A DataSource jndi name we are looking for. The found MBean OBJECT_NAME or null if none of the JDBC ResourceAdapter MBeanhave the given jndi name. throws: Exception - The ResourceAdapter MBeans checking failed.
Return the JDBC ResourceAdapter MBean ObjectNames deployed in the current server.
The JDBC ResourceAdapters have a 'properties' attribue containing the following properties
set (not null and not empty): 'dsClass', 'URL'.
The found MBean ObjectNames or null if no JDBC ResourceAdapter MBean registered forthe current server in the current domain. throws: Exception - The ResourceAdapter MBeans checking failed.
This method is added temporarily. It will disapear when Rars will have their associated MBeans
(when Rars will become manageable)
the names of the rars currently deployed in the JOnAS server
Test if the specified filename is already deployed or not.
Parameters: fileName - the name of the rar file. true if the rar is deployed, else false.
isRarDeployedByUnpackName
public boolean isRarDeployedByUnpackName(String unpackName)(Code)
Test if the specified unpack name is already deployed or not. This
method is defined in the ResourceService interface.
Parameters: unpackName - the name of the rar file. true if the rar is deployed, else false.
Undeploy an RAR by delegating the operation to the unRegisterRar() method.
This is used for JMX management.
Parameters: fileName - the fileName of the rar which must be be undeployed. throws: RemoteException - if rmi call failed. throws: ResourceServiceException - if the undeployment of the RAR failed.
unDeployRars
public void unDeployRars(URL[] urls, URL earUrl)(Code)
Undeploy the given rars of an ear file. (This method is only
used for the ear applications).
Parameters: urls - the list of the urls of the rars to undeploy. Parameters: earUrl - the URL of the associated EAR file