KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > ojb > ejb > SessionBeanImpl


1 package org.apache.ojb.ejb;
2
3 /* Copyright 2002-2005 The Apache Software Foundation
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */

17
18 import javax.ejb.EJBException JavaDoc;
19 import javax.ejb.SessionBean JavaDoc;
20 import javax.ejb.SessionContext JavaDoc;
21
22 /**
23  * Base session bean implementation class
24  * for EJB2.0 or higher. Note: Derived classes
25  * must implement the {@link javax.ejb.SessionBean}
26  * interface (got problems using xdoclet when
27  * implement this interface with this class).
28  *
29  * @author <a HREF="mailto:armin@codeAuLait.de">Armin Waibel</a>
30  * @version $Id: SessionBeanImpl.java,v 1.6.2.1 2005/12/21 22:21:38 tomdz Exp $
31  */

32 public abstract class SessionBeanImpl
33 {
34     private SessionContext JavaDoc ctx;
35
36     public void ejbCreate()
37     {
38
39     }
40
41     public void setSessionContext(SessionContext JavaDoc ctx)
42     {
43         this.ctx = ctx;
44     }
45
46     public SessionContext JavaDoc getSessionContext()
47     {
48         return ctx;
49     }
50
51     public void ejbActivate() throws EJBException JavaDoc
52     {
53     }
54
55     public void ejbPassivate() throws EJBException JavaDoc
56     {
57     }
58
59     public void ejbRemove() throws EJBException JavaDoc
60     {
61         this.ctx = null;
62     }
63 }
64
Popular Tags