A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
OCA Java SE 8 Programmer I Study Guide 1Z0-808
this week in the
EJB and other Java EE Technologies
MDB onMessage method
Joined: Feb 23, 2006
May 03, 2006 22:57:00
I am trying an application where i am sending an Object message from a helper class to a queue, i a using the following code for that :
queueSession = getSession();
queueSender = null;
Queue queue = null;
queue = getQueue();
queueSender = queueSession.createSender(queue);
object = queueSession.createObjectMessage(emp);
// here emp is a serializable
object which has two
variables empName and empDept
// some code
And in the MDB in the onMessage i check for an object message, but the below line gives me an error:
if (message instanceof
) message).getObject() instanceof Employee)
// some code
s found for: com.employee.details.Employee where Employee is the object whichi have sent as object message.
Anybody could give a suggestion, would be of great help for me.
Thanks for any help.
Joined: Feb 27, 2002
May 04, 2006 07:08:00
Is the employee class included alon with MDB.
I agree. Here's the link:
subject: MDB onMessage method
Getting very strange exception: JMS in EJB3, JBoss
JMS temporary queue weblogic
MessageListener in AQ JMS
Error deserializing Object
sending org.jdom.Document object over JMS
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015