01: package org.apache.ojb.ejb;
02:
03: /* Copyright 2002-2005 The Apache Software Foundation
04: *
05: * Licensed under the Apache License, Version 2.0 (the "License");
06: * you may not use this file except in compliance with the License.
07: * You may obtain a copy of the License at
08: *
09: * 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;
19: import javax.ejb.SessionBean;
20: import javax.ejb.SessionContext;
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: private SessionContext ctx;
34:
35: public void ejbCreate() {
36:
37: }
38:
39: public void setSessionContext(SessionContext ctx) {
40: this .ctx = ctx;
41: }
42:
43: public SessionContext getSessionContext() {
44: return ctx;
45: }
46:
47: public void ejbActivate() throws EJBException {
48: }
49:
50: public void ejbPassivate() throws EJBException {
51: }
52:
53: public void ejbRemove() throws EJBException {
54: this.ctx = null;
55: }
56: }
|