KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > jonas > ear > EarService


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): Florent BENOIT & Ludovic BERT
22  * --------------------------------------------------------------------------
23  * $Id: EarService.java,v 1.7 2004/09/14 14:45:58 pelletib Exp $
24  * --------------------------------------------------------------------------
25  */

26
27 package org.objectweb.jonas.ear;
28
29 import javax.naming.Context JavaDoc;
30
31 import org.objectweb.jonas.service.Service;
32
33 /**
34  * JOnAS EAR Service interface. This interface provides a description of an EAR
35  * service.
36  * @author Ludovic Bert
37  * @author Florent Benoit
38  */

39 public interface EarService extends Service {
40
41     /**
42      * Deploy an EAR file with sending JAR file to the EJB container and WAR
43      * file to the WEB container.
44      * @param ctx the context which contains the configuration in order to
45      * deploy an EAR.
46      * @return The ObjectName of the J2EE Application MBean associated to the
47      * deployed EAR
48      * @throws EarServiceException if the deployment of the EAR failed.
49      */

50     String JavaDoc deployEar(Context JavaDoc ctx) throws EarServiceException;
51
52     /**
53      * Undeploy an EAR by sending the request to the EJB container and to the
54      * WEB container.
55      * @param ctx the context which contains the configuration in order to
56      * undeploy an EAR.
57      * @throws EarServiceException if the undeployment of the EAR failed.
58      */

59     void unDeployEar(Context JavaDoc ctx) throws EarServiceException;
60
61     /**
62      * Deploy an EAR, used by management applications via J2EEServer managed
63      * object
64      * @param fileName the fileName of the ear which must be be deployed.
65      * @return The ObjectName of the MBean associated to the deployed J2EE
66      * Application
67      * @throws Exception if the deployment of the EAR failed.
68      */

69     String JavaDoc deployEar(String JavaDoc fileName) throws Exception JavaDoc;
70
71     /**
72      * Test if the specified filename is already deployed or not.
73      * @param fileName the name of the ear file.
74      * @return true if the ear is deployed, else false.
75      */

76     Boolean JavaDoc isEarDeployed(String JavaDoc fileName);
77
78     /**
79      * Test if the specified unpack name is already deployed or not. This
80      * method is defined in the EarService interface.
81      * @param unpackName the name of the ear file.
82      * @return true if the ear is deployed, else false.
83      */

84     boolean isEarDeployedByUnpackName(String JavaDoc unpackName);
85
86     /**
87      * Undeploy an EAR, used by management applications via J2EEServer managed
88      * object
89      * @param fileName the fileName of the ear which must be be undeployed.
90      * @throws Exception if the undeployment of the EAR failed.
91      */

92     void unDeployEar(String JavaDoc fileName) throws Exception JavaDoc;
93
94     /**
95      * Return the Apps directory.
96      * @return The Apps directory
97      */

98     String JavaDoc getAppsDirectory();
99
100 }
Popular Tags