01: /*
02: * JOnAS: Java(TM) Open Application Server
03: * Copyright (C) 1999 Bull S.A.
04: * Contact: jonas-team@objectweb.org
05: *
06: * This library is free software; you can redistribute it and/or
07: * modify it under the terms of the GNU Lesser General Public
08: * License as published by the Free Software Foundation; either
09: * version 2.1 of the License, or any later version.
10: *
11: * This library is distributed in the hope that it will be useful,
12: * but WITHOUT ANY WARRANTY; without even the implied warranty of
13: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14: * Lesser General Public License for more details.
15: *
16: * You should have received a copy of the GNU Lesser General Public
17: * License along with this library; if not, write to the Free Software
18: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
19: * USA
20: *
21: * Initial developer(s): ____________________________________.
22: * Contributor(s): ______________________________________.
23: *
24: * --------------------------------------------------------------------------
25: * $Id: MdbBean_a.java 8239 2006-04-13 08:40:49Z coqp $
26: * --------------------------------------------------------------------------
27: */
28:
29: // MdbBean_a.java
30: // Message Driven bean
31: package newsamplemdb;
32:
33: import javax.ejb.MessageDrivenBean;
34: import javax.ejb.MessageDrivenContext;
35:
36: /**
37: * Superclass of the MessageDrivenBean class MdbBean
38: * Note that this class is not public but ejbCreate is public
39: * (it's only for reproducing the 300387 bug!)
40: */
41: class MdbBean_a implements MessageDrivenBean {
42:
43: private transient MessageDrivenContext mdbContext;
44:
45: // ------------------------------------------------------------------
46: // MessageDrivenBean implementation
47: // ------------------------------------------------------------------
48:
49: /**
50: * Default constructor
51: *
52: */
53: public MdbBean_a() {
54: }
55:
56: /**
57: * Set the associated context. The container call this method
58: * after the instance creation.
59: * The enterprise Bean instance should store the reference to the context
60: * object in an instance variable.
61: * This method is called with no transaction context.
62: *
63: * @param ctx A MessageDrivenContext interface for the instance.
64: */
65:
66: public void setMessageDrivenContext(MessageDrivenContext ctx) {
67: System.out.println("MdbBean_a setMessageDrivenContext");
68: mdbContext = ctx;
69: }
70:
71: /**
72: * A container invokes this method before it ends the life of the message-driven object.
73: * This happens when a container decides to terminate the message-driven object.
74: *
75: * This method is called with no transaction context.
76: *
77: */
78: public void ejbRemove() {
79: System.out.println("MdbBean_a ejbRemove");
80: }
81:
82: /**
83: * The Message driven bean must define an ejbCreate methods with no args.
84: *
85: */
86: public void ejbCreate() {
87: System.out.println("MdbBean_a ejbCreate");
88: }
89:
90: }
|