org.objectweb.jonas.resource
Interface ResourceService

All Superinterfaces:
Service
All Known Implementing Classes:
ResourceServiceImpl

public interface ResourceService
extends Service

JCA resource service implmentation

Author:
Philippe Coq Contributor(s): JOnAS 2.4 Sebastien Chassande-Barrioz (sebastien.chassande@inrialpes.fr) JOnAS 3.0 Eric Hardesty (Eric.Hardesty@bull.com) JOnAS 4.0 Adriana Danes (JSR 77 + use of Jakarta Modeler Component : http://jakarta.apache.org/commons/modeler) Eric Hardesty (J2CA 1.5)

Method Summary
 java.lang.String createResourceAdapter(javax.naming.Context ctx)
          Create a Resource Adapter
 java.lang.String deployRar(java.lang.String fileName)
          Deploy an RAR, used by management applications via J2EEServer managed object
 void deployRars(javax.naming.Context ctx)
          Deploy the given rars of an ear file with the specified parent classloader (ear classloader).
 java.lang.String getRarsDirectory()
          Return the Rars directory.
 java.lang.Boolean isRarDeployed(java.lang.String fileName)
          Test if the specified filename is already deployed or not.
 boolean isRarDeployedByUnpackName(java.lang.String unpackName)
          Test if the specified unpack name is already deployed or not.
 void unDeployRar(java.lang.String fileName)
          Undeploy an RAR, used by management applications via J2EEServer managed object
 void unDeployRars(java.net.URL[] urls, java.net.URL earUrl)
          Undeploy the given rars of an ear file with the specified parent classloader (ear classloader).
 
Methods inherited from interface org.objectweb.jonas.service.Service
getName, init, isStarted, setName, start, stop
 

Method Detail

createResourceAdapter

public java.lang.String createResourceAdapter(javax.naming.Context ctx)
                                       throws java.lang.Exception
Create a Resource Adapter

Parameters:
ctx - Context that defines the: 1) name of the resource adapter. 2) information to determine if the rar is in an ear the configuration information for this resource adapter must be found in the xml files in the rar file being deployed
Returns:
The ObjectName of the MBean associated to the deployed J2EE Application
Throws:
java.lang.Exception - if the create of the RAR object fails.

deployRar

public java.lang.String deployRar(java.lang.String fileName)
                           throws java.lang.Exception
Deploy an RAR, used by management applications via J2EEServer managed object

Parameters:
fileName - the fileName of the rar which must be be deployed.
Returns:
The ObjectName of the MBean associated to the deployed J2EE Application
Throws:
java.lang.Exception - if the deployment of the RAR failed.

deployRars

public void deployRars(javax.naming.Context ctx)
                throws ResourceServiceException
Deploy the given rars of an ear file with the specified parent classloader (ear classloader). (This method is only used for the ear applications).

Parameters:
ctx - Context that defines the: 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.
Throws:
ResourceServiceException - if an error occurs during the deployment.

getRarsDirectory

public java.lang.String getRarsDirectory()
Return the Rars directory.

Returns:
The Rars directory

isRarDeployed

public java.lang.Boolean isRarDeployed(java.lang.String fileName)
Test if the specified filename is already deployed or not.

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

isRarDeployedByUnpackName

public boolean isRarDeployedByUnpackName(java.lang.String unpackName)
Test if the specified unpack name is already deployed or not. This method is defined in the RarService interface.

Parameters:
unpackName - the name of the rar file.
Returns:
true if the rar is deployed, else false.

unDeployRar

public void unDeployRar(java.lang.String fileName)
                 throws java.lang.Exception
Undeploy an RAR, used by management applications via J2EEServer managed object

Parameters:
fileName - the fileName of the rar which must be be undeployed.
Throws:
java.lang.Exception - if the undeployment of the RAR failed.

unDeployRars

public void unDeployRars(java.net.URL[] urls,
                         java.net.URL earUrl)
Undeploy the given rars of an ear file with the specified parent classloader (ear classloader). (This method is only used for the ear applications).

Parameters:
urls - the list of the urls of the rars to deploy.
earUrl - ear's URL