[jboss-user] [JBoss Messaging] - Re: MDB - Obejctmessage exception

Michael Brown do-not-reply at jboss.com
Wed Feb 2 13:23:10 EST 2011

Michael Brown [http://community.jboss.org/people/mluisbrown] created the discussion

"Re: MDB - Obejctmessage exception"

To view the discussion, visit: http://community.jboss.org/message/585000#585000

This is a bug, as mentioned in this thread  http://community.jboss.org/message/517604#517604 http://community.jboss.org/message/517604#517604 , allthough supposedly it has been fixed in JBoss 5.0.1 GA.

The workaround which I am using is mentioned in the thread, but here it is again:

logger.info("ObjectMessage Detected");

Student st = null;

// get the current TCCL
ClassLoader originalTCCL = Thread.currentThread().getContextClassLoader();

    // temporarily change TCCL

    ObjectMessage om = (ObjectMessage) message;
    logger.info("ObjectMessage Created");
    Student s = (Student) om.getObject();
    logger.info("Student created");
catch (Exception e)
    // set back the original TCCL

logger.info("Object Message : "+st.toString());

Reply to this message by going to Community

Start a new discussion in JBoss Messaging at Community

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20110202/5f9dca6c/attachment.html 

More information about the jboss-user mailing list