KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > openejb > spi > ContainerSystem


1 /**
2  * Redistribution and use of this software and associated documentation
3  * ("Software"), with or without modification, are permitted provided
4  * that the following conditions are met:
5  *
6  * 1. Redistributions of source code must retain copyright
7  * statements and notices. Redistributions must also contain a
8  * copy of this document.
9  *
10  * 2. Redistributions in binary form must reproduce the
11  * above copyright notice, this list of conditions and the
12  * following disclaimer in the documentation and/or other
13  * materials provided with the distribution.
14  *
15  * 3. The name "Exolab" must not be used to endorse or promote
16  * products derived from this Software without prior written
17  * permission of Exoffice Technologies. For written permission,
18  * please contact info@exolab.org.
19  *
20  * 4. Products derived from this Software may not be called "Exolab"
21  * nor may "Exolab" appear in their names without prior written
22  * permission of Exoffice Technologies. Exolab is a registered
23  * trademark of Exoffice Technologies.
24  *
25  * 5. Due credit should be given to the Exolab Project
26  * (http://www.exolab.org/).
27  *
28  * THIS SOFTWARE IS PROVIDED BY EXOFFICE TECHNOLOGIES AND CONTRIBUTORS
29  * ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT
30  * NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
31  * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
32  * EXOFFICE TECHNOLOGIES OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
33  * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
34  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
35  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
36  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
37  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
38  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
39  * OF THE POSSIBILITY OF SUCH DAMAGE.
40  *
41  * Copyright 1999 (C) Exoffice Technologies Inc. All Rights Reserved.
42  *
43  * $Id: ContainerSystem.java 1921 2005-06-19 22:40:34Z jlaskowski $
44  */

45
46 package org.openejb.spi;
47
48 import org.openejb.Container;
49 import org.openejb.DeploymentInfo;
50
51 /**
52  * The ContainerSystem interface represents a complete OpenEJB container system including
53  * ContainerManagers, Containers, deployed enterprise beans and the primary services
54  * (transaction, security, and persistence).
55  * <p>
56  * The ContainerSystem serves as the root in the container system hierarchy. The
57  * ContainerSystem contains one or more ContainerManagers. ContainerManagers contain
58  * one or more Containers. Containers contain one or more deployed beans of particular kind
59  * (stateless, stateful, or entity).
60  * <p>
61  * The access to other parts of the container system hierarchy is not ridged, the
62  * ContainerSystem interface provides methods for accessing its ContainerManagers by
63  * ID or as a collection. The interface also provides methods for obtaining references to
64  * specific Containers and DeploymentInfo objects by ID. IDs for all elements of the
65  * container system are unique across the container system.
66  * <p>
67  * The default implementation of this interface is provided by the
68  * org.openejb.core.ContainerSystem class.
69  * <p>
70  * @author Richard Monson-Haefel
71  * @version 0.1, 3/21/2000
72  * @since JDK 1.2
73  * @see org.openejb.core.ContainerSystem
74  */

75 public interface ContainerSystem {
76
77
78
79     /**
80      * Gets the <code>DeploymentInfo</code> object for the bean with the specified deployment id.
81      *
82      * @param id the deployment id of the deployed bean.
83      * @return the DeploymentInfo object associated with the bean.
84      * @see DeploymentInfo
85      * @see Container#getDeploymentInfo(Object) Container.getDeploymentInfo
86      * @see DeploymentInfo#getDeploymentID()
87      */

88     public DeploymentInfo getDeploymentInfo(Object JavaDoc id);
89
90     /**
91      * Gets the <code>DeploymentInfo</code> objects for all the beans deployed in all the containers in this container system.
92      *
93      * @return an array of DeploymentInfo objects
94      * @see DeploymentInfo
95      * @see Container#deployments() Container.deployments()
96      */

97     public DeploymentInfo [] deployments( );
98
99     /**
100      * Returns the <code>Container</code> in this container system with the specified id.
101      *
102      * @param id the id of the Container
103      * @return the Container associated with the id
104      * @see Container
105      * @see Container#getContainerID() Container.getContainerID()
106      */

107     public Container getContainer(Object JavaDoc id);
108
109     /**
110      * Gets all the <code>Container</code>s in this container system.
111      *
112      * @return an array of all the Containers
113      * @see Container
114      */

115     public Container [] containers( );
116
117
118     /**
119     * Returns the global JNDI name space for the OpenEJB container system.
120     * The global JNDI name space contains bindings for all enterprise bean
121     * EJBHome object deployed in the entire container system. EJBHome objects
122     * are bound using their deployment-id under the java:openejb/ejb/ namespace.
123     * For example, an enterprise bean with the deployment id = 55555 would be
124     * have its EJBHome bound to the name "java:openejb/ejb/55555"
125     *
126     * @return the global JNDI context
127     */

128     public javax.naming.Context JavaDoc getJNDIContext();
129 }
Popular Tags