Source Code Cross Referenced for SessionBean.java in  » EJB-Server-GlassFish » ejb-api » javax » ejb » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » EJB Server GlassFish » ejb api » javax.ejb 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
003:         * 
004:         * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
005:         * 
006:         * The contents of this file are subject to the terms of either the GNU
007:         * General Public License Version 2 only ("GPL") or the Common Development
008:         * and Distribution License("CDDL") (collectively, the "License").  You
009:         * may not use this file except in compliance with the License. You can obtain
010:         * a copy of the License at https://glassfish.dev.java.net/public/CDDL+GPL.html
011:         * or glassfish/bootstrap/legal/LICENSE.txt.  See the License for the specific
012:         * language governing permissions and limitations under the License.
013:         * 
014:         * When distributing the software, include this License Header Notice in each
015:         * file and include the License file at glassfish/bootstrap/legal/LICENSE.txt.
016:         * Sun designates this particular file as subject to the "Classpath" exception
017:         * as provided by Sun in the GPL Version 2 section of the License file that
018:         * accompanied this code.  If applicable, add the following below the License
019:         * Header, with the fields enclosed by brackets [] replaced by your own
020:         * identifying information: "Portions Copyrighted [year]
021:         * [name of copyright owner]"
022:         * 
023:         * Contributor(s):
024:         * 
025:         * If you wish your version of this file to be governed by only the CDDL or
026:         * only the GPL Version 2, indicate your decision by adding "[Contributor]
027:         * elects to include this software in this distribution under the [CDDL or GPL
028:         * Version 2] license."  If you don't indicate a single choice of license, a
029:         * recipient has the option to distribute your version of this file under
030:         * either the CDDL, the GPL Version 2 or to extend the choice of license to
031:         * its licensees as provided above.  However, if you add GPL Version 2 code
032:         * and therefore, elected the GPL Version 2 license, then the option applies
033:         * only if the new code is made subject to such option by the copyright
034:         * holder.
035:         */
036:        package javax.ejb;
037:
038:        import java.rmi.RemoteException;
039:
040:        /**
041:         * The SessionBean interface is implemented by every session enterprise Bean 
042:         * class. The container uses the SessionBean methods to notify the enterprise
043:         * Bean instances of the instance's life cycle events.
044:         */
045:        public interface SessionBean extends EnterpriseBean {
046:            /**
047:             * Set the associated session context. The container calls this method
048:             * after the instance creation.
049:             *
050:             * <p> The enterprise Bean instance should store the reference to the
051:             * context object in an instance variable.
052:             *
053:             * <p> This method is called with no transaction context.
054:             *
055:             * @param ctx A SessionContext interface for the instance.
056:             *
057:             * @exception EJBException Thrown by the method to indicate a failure
058:             *    caused by a system-level error.
059:             *
060:             * @exception RemoteException This exception is defined in the method
061:             *    signature to provide backward compatibility for applications written
062:             *    for the EJB 1.0 specification. Enterprise beans written for the 
063:             *    EJB 1.1 specification should throw the
064:             *    javax.ejb.EJBException instead of this exception.
065:             *    Enterprise beans written for the EJB2.0 and higher specifications
066:             *    must throw the javax.ejb.EJBException instead of this exception.
067:             */
068:            void setSessionContext(SessionContext ctx) throws EJBException,
069:                    RemoteException;
070:
071:            /**
072:             * A container invokes this method before it ends the life of the session
073:             * object. This happens as a result of a client's invoking a remove
074:             * operation, or when a container decides to terminate the session object
075:             * after a timeout.
076:             * 
077:             * <p> This method is called with no transaction context.
078:             *
079:             * @exception EJBException Thrown by the method to indicate a failure
080:             *    caused by a system-level error.
081:             *
082:             * @exception RemoteException This exception is defined in the method
083:             *    signature to provide backward compatibility for enterprise beans 
084:             *    written for the EJB 1.0 specification. Enterprise beans written 
085:             *    for the EJB 1.1 specification should throw the
086:             *    javax.ejb.EJBException instead of this exception.
087:             *    Enterprise beans written for the EJB2.0 and higher specifications
088:             *    must throw the javax.ejb.EJBException instead of this exception.
089:             */
090:            void ejbRemove() throws EJBException, RemoteException;
091:
092:            /**
093:             * The activate method is called when the instance is activated
094:             * from its "passive" state. The instance should acquire any resource
095:             * that it has released earlier in the ejbPassivate() method.
096:             *
097:             * <p> This method is called with no transaction context.
098:             *
099:             * @exception EJBException Thrown by the method to indicate a failure
100:             *    caused by a system-level error.
101:             *
102:             * @exception RemoteException This exception is defined in the method
103:             *    signature to provide backward compatibility for enterprise beans 
104:             *    written for the EJB 1.0 specification. Enterprise beans written 
105:             *    for the EJB 1.1 specification should throw the
106:             *    javax.ejb.EJBException instead of this exception.
107:             *    Enterprise beans written for the EJB2.0 and higher specifications
108:             *    must throw the javax.ejb.EJBException instead of this exception.
109:             */
110:            void ejbActivate() throws EJBException, RemoteException;
111:
112:            /**
113:             * The passivate method is called before the instance enters
114:             * the "passive" state. The instance should release any resources that
115:             * it can re-acquire later in the ejbActivate() method.
116:             *
117:             * <p> After the passivate method completes, the instance must be
118:             * in a state that allows the container to use the Java Serialization
119:             * protocol to externalize and store away the instance's state.
120:             *
121:             * <p> This method is called with no transaction context.
122:             *
123:             * @exception EJBException Thrown by the method to indicate a failure
124:             *    caused by a system-level error.
125:             *
126:             * @exception RemoteException This exception is defined in the method
127:             *    signature to provide backward compatibility for enterprise beans 
128:             *    written for the EJB 1.0 specification. Enterprise beans written 
129:             *    for the EJB 1.1 specification should throw the
130:             *    javax.ejb.EJBException instead of this exception.
131:             *    Enterprise beans written for the EJB2.0 and higher specifications
132:             *    must throw the javax.ejb.EJBException instead of this exception.
133:             */
134:            void ejbPassivate() throws EJBException, RemoteException;
135:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.