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_b.java 8239 2006-04-13 08:40:49Z coqp $
26: * --------------------------------------------------------------------------
27: */
28:
29: // MdbBean_b.java
30: // Message Driven bean
31: package newsamplemdb;
32:
33: import javax.ejb.MessageDrivenContext;
34: import javax.jms.MessageListener;
35: import javax.jms.Message;
36: import javax.jms.TextMessage;
37: import javax.jms.JMSException;
38:
39: /**
40: * Superclass of the MessageDrivenBean class MdbBean
41: * Note that this public class is implementing onMessage method
42: * (it's only for reproducing the 300387 bug!)
43: */
44: public class MdbBean_b extends MdbBean_a implements MessageListener {
45:
46: /**
47: * Default constructor
48: *
49: */
50: public MdbBean_b() {
51: }
52:
53: /**
54: * onMessage method
55: */
56: public void onMessage(Message message) {
57: System.out.println("MdbBean onMessage");
58: try {
59: TextMessage mess = (TextMessage) message;
60: System.out.println("Message received: " + mess.getText());
61: } catch (JMSException ex) {
62: System.err.println("Exception caught: " + ex);
63: }
64: }
65:
66: }
|