01: /*
02: * The contents of this file are subject to the Sapient Public License
03: * Version 1.0 (the "License"); you may not use this file except in compliance
04: * with the License. You may obtain a copy of the License at
05: * http://carbon.sf.net/License.html.
06: *
07: * Software distributed under the License is distributed on an "AS IS" basis,
08: * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
09: * the specific language governing rights and limitations under the License.
10: *
11: * The Original Code is The Carbon Component Framework.
12: *
13: * The Initial Developer of the Original Code is Sapient Corporation
14: *
15: * Copyright (C) 2003 Sapient Corporation. All Rights Reserved.
16: */
17:
18: package org.sape.carbon.services.ejb.local.test;
19:
20: import javax.ejb.CreateException;
21: import javax.ejb.SessionBean;
22: import javax.ejb.SessionContext;
23:
24: /**
25: * <p>Bean implementation for the LocalTestBean
26: *
27: * Copyright 2002 Sapient
28: * @see LocalTester
29: * @see LocalTesterHome
30: * @version $Revision: 1.4 $
31: * @author $Author: dvoet $ $Date: 2003/05/05 21:21:28 $
32: */
33: public class LocalTesterBean implements SessionBean {
34:
35: /**
36: * Contains the SessionContext attribute for this instance
37: */
38: protected SessionContext ctx;
39:
40: public void ejbCreate() throws CreateException {
41:
42: }
43:
44: public void ejbActivate() {
45:
46: }
47:
48: public void ejbPassivate() {
49:
50: }
51:
52: public void ejbRemove() {
53:
54: }
55:
56: /**
57: * Returns the SessionContext associated with this instance.
58: *
59: * @return javax.ejb.SessionContext
60: */
61: public SessionContext getSessionContext() {
62: return ctx;
63: }
64:
65: /**
66: * Assigns the SessionContext of the current instance to the provided
67: * parameter.
68: *
69: * @param ctx the SessionContext to assign to this instance.
70: */
71: public void setSessionContext(SessionContext ctx) {
72: this .ctx = ctx;
73: }
74:
75: /**
76: * Returns the name of the class of this object, used for debugging
77: * purposes.
78: *
79: * @return String Identification
80: */
81: public String id() {
82: return (this.getClass().getName());
83: }
84: }
|