01: package org.mockejb.test;
02:
03: import javax.ejb.*;
04:
05: import org.apache.commons.logging.*;
06:
07: /**
08: * Sample stateful session bean.
09: *
10: * @ejb:bean type="Stateful" view-type="remote" name="SampleStatefulService"
11: * jndi-name="mockejb/SampleStatefulService"
12: * @weblogic.clustering home-is-clusterable="False"
13: *
14: */
15: public class SampleStatefulServiceBean extends BaseSessionBean {
16:
17: // logger for this class
18: private static Log logger = LogFactory
19: .getLog(SampleStatefulServiceBean.class.getName());
20:
21: private String someState;
22:
23: /**
24: * Returns a variable that was set by the create method
25: *
26: * @ejb.interface-method
27: * @ejb:transaction type="Supports"
28: */
29: public String getSampleState() {
30:
31: return this .someState;
32:
33: }
34:
35: public void ejbCreate(String someState) throws CreateException {
36: log("ejbCreate called");
37:
38: this.someState = someState;
39: }
40:
41: }
|