Hi Everybody,
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 queueSession = getSession();
QueueSender queueSender = null;
Queue queue = null;
ObjectMessage object =null;
try{
queue = getQueue();
queueSender = queueSession.createSender(queue);
object = queueSession.createObjectMessage(emp);
// here emp is a serializable java object which has two string variables empName and empDept
queueSender.send(getQueue(),object);
}catch(JMSException){
// some code
}
And in the MDB in the onMessage i check for an object message, but the below line gives me an error:
onMessage(Message message){
if (message instanceof ObjectMessage && ((ObjectMessage) message).getObject() instanceof Employee)
{
// some code
}
}
javax.jms.MessageFormatException: ClassNotFoundException: No ClassLoader
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.
Sridhar.
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 queueSession = getSession();
QueueSender queueSender = null;
Queue queue = null;
ObjectMessage object =null;
try{
queue = getQueue();
queueSender = queueSession.createSender(queue);
object = queueSession.createObjectMessage(emp);
// here emp is a serializable java object which has two string variables empName and empDept
queueSender.send(getQueue(),object);
}catch(JMSException){
// some code
}
And in the MDB in the onMessage i check for an object message, but the below line gives me an error:
onMessage(Message message){
if (message instanceof ObjectMessage && ((ObjectMessage) message).getObject() instanceof Employee)
{
// some code
}
}
javax.jms.MessageFormatException: ClassNotFoundException: No ClassLoader
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.
Sridhar.