KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > jonas_ejb > container > Container


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): Philippe Coq
22  *
23  * --------------------------------------------------------------------------
24  * $Id: Container.java,v 1.14 2005/07/13 06:29:45 durieuxp Exp $
25  * --------------------------------------------------------------------------
26  */

27
28
29 package org.objectweb.jonas_ejb.container;
30
31
32 import org.objectweb.jonas_lib.naming.ContainerNaming;
33
34 import org.objectweb.jonas_jms.api.JmsManager;
35 import org.objectweb.transaction.jta.TransactionManager;
36
37 /**
38  * A Container is what a JOnAS Server can see of a JOnAS Container.
39  * It holds all beans coming from a same ejbjar file.
40  * There is no possibility to add or remove dynamically beans in
41  * a Container since it is build with all its beans.
42  * JMX can use this interface, but no specific Jmx classes should
43  * be inside the Container. Its management is done outside jonas_ejb.
44  * @author Philippe Coq
45  * @author Jeff Mesnil (security)
46  * @author Christophe Ney (PrincipalFactory)
47  * @author Philippe Durieux (add missing methods)
48  * @author Benjamin Bonnet (max size for thread pool)
49  * @author Florent Benoit : JACC
50  */

51 public interface Container {
52
53     /**
54      * @return List of beans hosted in this Container
55      */

56     String JavaDoc [] listBeanNames();
57
58     /**
59      * @return name of this Container
60      */

61     String JavaDoc getName();
62
63     /**
64      * @return the file name of the container (.xml or .jar)
65      */

66     String JavaDoc getFileName();
67
68
69     /**
70      * @return the external(user) file name of the container
71      */

72     String JavaDoc getExternalFileName();
73
74
75     /**
76      * @return the classloader used for this Container
77      */

78     ClassLoader JavaDoc getClassLoader();
79
80     /**
81      * Set the PrincipalFactory. This factory can be JOnAS Server dependant.
82      * The Container makes no assumption on how to get the Principal.
83      * @param pf the PrincipalFactory
84      */

85     void setPrincipalFactory(PrincipalFactory pf);
86
87     /**
88      * @return the PrincipalFactory of the Container
89      */

90     PrincipalFactory getPrincipalFactory();
91
92     /**
93      * set the ContainerNaming object
94      * @param naming the ContainerNaming object
95      */

96     void setContainerNaming(ContainerNaming naming);
97
98     /**
99      * @return the ContainerNaming object
100      */

101     ContainerNaming getContainerNaming();
102
103     /**
104      * Synchronize all entity beans
105      * @param passivate true if bean instances will be released after
106      * having been written on storage.
107      */

108     void syncAll(boolean passivate);
109
110     /**
111      * set the Transaction Manager.
112      * @param tm the Transaction Manager.
113      */

114     void setTransactionManager(TransactionManager tm);
115
116     /**
117      * @return the Transaction Manager
118      */

119     TransactionManager getTransactionManager();
120
121     /**
122      * set the JmsManager object
123      * @param jms the JmsManager
124      */

125     void setJmsManager(JmsManager jms);
126
127     /**
128      * @return the JmsManager object
129      */

130     JmsManager getJmsManager();
131
132     /**
133      * set the name of the ear application containing this container.
134      * @param fileName the name of the ear application containing this
135      * container.
136      */

137     void setEarFileName(String JavaDoc fileName);
138
139     /**
140      * get the name of the ear application containing this container.
141      * @return the name of the ear application containing this
142      * container.
143      */

144     String JavaDoc getEarFileName();
145
146     /**
147      * Remove the JOnAS container and unregister all beans.
148      */

149     void remove();
150
151     /**
152      * Set the security flag to enable or disable security
153      * @param b true or false to enable/disable security
154      */

155     void setSecurity(boolean b);
156
157     /**
158      * Set the permission manager object
159      * @param permissionManager permission manager object
160      */

161     void setPermissionManager(PermissionManager permissionManager);
162
163     /**
164      * Gets the permission manager
165      * @return the permission manager
166      */

167     PermissionManager getPermissionManager();
168
169     /**
170      * Gets the context ID of this container (for jacc)
171      * @return contextID used for JACC
172      */

173     String JavaDoc getContextId();
174     
175     BeanFactory getBeanFactory(String JavaDoc beanName);
176 }
177
Popular Tags