KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > javax > ejb > EJBObject


1 /**
2  * EasyBeans
3  * Copyright (C) 2006 Bull S.A.S.
4  * Contact: easybeans@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  * --------------------------------------------------------------------------
22  * $Id: EJBObject.java 1100 2006-08-16 13:05:31Z benoitf $
23  * --------------------------------------------------------------------------
24  */

25
26 package javax.ejb;
27
28 import java.rmi.Remote JavaDoc;
29 import java.rmi.RemoteException JavaDoc;
30
31 /**
32  * Used by EJB 2.1 for their business remote interface.
33  * @see <a HREF="http://www.jcp.org/en/jsr/detail?id=220">EJB 3.0 specification</a>
34  * @author Florent Benoit
35  */

36 public interface EJBObject extends Remote JavaDoc {
37
38     /**
39      * Obtain the enterprise Bean's remote home interface. The remote home
40      * interface defines the enterprise Bean's create, finder, remove, and home
41      * business methods.
42      * @return A reference to the enterprise Bean's home interface.
43      * @throws RemoteException Thrown when the method failed due to a
44      * system-level failure.
45      */

46     EJBHome JavaDoc getEJBHome() throws RemoteException JavaDoc;
47
48     /**
49      * Obtain the primary key of the EJB object.<br>
50      * This method can be called on an entity bean. An attempt to invoke this
51      * method on a session bean will result in RemoteException.
52      * @return The EJB object's primary key.
53      * @throws RemoteException Thrown when the method failed due to a
54      * system-level failure or when invoked on a session bean.
55      */

56     Object JavaDoc getPrimaryKey() throws RemoteException JavaDoc;
57
58     /**
59      * Remove the EJB object.
60      * @throws RemoteException Thrown when the method failed due to a
61      * system-level failure.
62      * @throws RemoveException The enterprise Bean or the container does not
63      * allow destruction of the object.
64      */

65     void remove() throws RemoteException JavaDoc, RemoveException JavaDoc;
66
67     /**
68      * Obtain a handle for the EJB object. The handle can be used at later time
69      * to re-obtain a reference to the EJB object, possibly in a different Java
70      * Virtual Machine.
71      * @return A handle for the EJB object.
72      * @throws RemoteException Thrown when the method failed due to a
73      * system-level failure.
74      */

75     Handle JavaDoc getHandle() throws RemoteException JavaDoc;
76
77     /**
78      * Test if a given EJB object is identical to the invoked EJB object.
79      * @param obj An object to test for identity with the invoked object.
80      * @return True if the given EJB object is identical to the invoked object,
81      * false otherwise.
82      * @throws RemoteException Thrown when the method failed due to a
83      * system-level failure.
84      */

85     boolean isIdentical(EJBObject JavaDoc obj) throws RemoteException JavaDoc;
86
87 }
88
Popular Tags