KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > jonas > resource > ResourceService


1 /*
2  * JOnAS: Java(TM) Open Application Server
3  * Copyright (C) 1999 Bull S.A.
4  * Contact: jonas-team@objectweb.org
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
19  * USA
20  *
21  * Initial developer(s): ____________________________________.
22  * Contributor(s):
23  * JOnAS 2.4 Sebastien Chassande-Barrioz (sebastien.chassande@inrialpes.fr)
24  * JOnAS 3.0 Eric Hardesty (Eric.Hardesty@bull.com)
25  *
26  * --------------------------------------------------------------------------
27  * $Id: ResourceService.java,v 1.13 2004/10/29 23:33:37 ehardesty Exp $
28  * --------------------------------------------------------------------------
29  */

30 package org.objectweb.jonas.resource;
31
32 import java.net.URL JavaDoc;
33
34 import javax.naming.Context JavaDoc;
35
36 import org.objectweb.jonas.service.Service;
37
38 /**
39  * JCA resource service implmentation
40  * @author Philippe Coq
41  * Contributor(s):
42  * JOnAS 2.4 Sebastien Chassande-Barrioz (sebastien.chassande@inrialpes.fr)
43  * JOnAS 3.0 Eric Hardesty (Eric.Hardesty@bull.com)
44  * JOnAS 4.0 Adriana Danes (JSR 77 + use of Jakarta Modeler Component : http://jakarta.apache.org/commons/modeler)
45  * Eric Hardesty (J2CA 1.5)
46  *
47  */

48 public interface ResourceService extends Service {
49
50     /**
51      * Create a Resource Adapter
52      * @param ctx Context that defines the:
53      * 1) name of the resource adapter.
54      * 2) information to determine if the rar is in an ear
55      *
56      * the configuration information for this resource adapter
57      * must be found in the xml files in the rar file
58      * being deployed
59      * @return The ObjectName of the MBean associated to the deployed J2EE Application
60      * @throws Exception if the create of the RAR object fails.
61      */

62     String JavaDoc createResourceAdapter(Context JavaDoc ctx) throws Exception JavaDoc;
63
64     /**
65      * Deploy an RAR, used by management applications via J2EEServer managed object
66      * @param fileName the fileName of the rar which must be be deployed.
67      * @return The ObjectName of the MBean associated to the deployed J2EE Application
68      * @throws Exception if the deployment of the RAR failed.
69      */

70     String JavaDoc deployRar(String JavaDoc fileName) throws Exception JavaDoc;
71
72     /**
73      * Deploy the given rars of an ear file with the specified parent
74      * classloader (ear classloader). (This method is only used for
75      * the ear applications).
76      * @param ctx Context that defines the:
77      * This context contains the following parameters :<BR>
78      * - urls the list of the urls of the rars to deploy.<BR>
79      * - earRootURL the URL of the ear application file.<BR>
80      * - earClassLoader the ear classLoader of the j2ee app.<BR>
81      * - altDDs the optional URI of deployment descriptor.<BR>
82      * @throws ResourceServiceException if an error occurs during the deployment.
83      */

84     void deployRars(Context JavaDoc ctx) throws ResourceServiceException;
85
86     /**
87      * Return the Rars directory.
88      * @return The Rars directory
89      */

90     String JavaDoc getRarsDirectory();
91
92     /**
93      * Test if the specified filename is already deployed or not.
94      * @param fileName the name of the rar file.
95      * @return true if the rar is deployed, else false.
96      */

97     Boolean JavaDoc isRarDeployed(String JavaDoc fileName);
98
99     /**
100      * Test if the specified unpack name is already deployed or not. This
101      * method is defined in the RarService interface.
102      * @param unpackName the name of the rar file.
103      * @return true if the rar is deployed, else false.
104      */

105     boolean isRarDeployedByUnpackName(String JavaDoc unpackName);
106
107     /**
108      * Undeploy an RAR, used by management applications via J2EEServer managed object
109      * @param fileName the fileName of the rar which must be be undeployed.
110      * @throws Exception if the undeployment of the RAR failed.
111      */

112     void unDeployRar(String JavaDoc fileName) throws Exception JavaDoc;
113
114     /**
115      * Undeploy the given rars of an ear file with the specified parent
116      * classloader (ear classloader). (This method is only used for
117      * the ear applications).
118      * @param urls the list of the urls of the rars to deploy.
119      * @param earUrl ear's URL
120      */

121     void unDeployRars(URL JavaDoc[] urls, URL JavaDoc earUrl);
122
123 }
124
125
126
Popular Tags