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: {code} logger.info("ObjectMessage Detected"); Student st = null; // get the current TCCL ClassLoader originalTCCL = Thread.currentThread().getContextClassLoader(); try { // temporarily change TCCL Thread.currentThread().setContextClassLoader(this.getClass().getClassLoader()); ObjectMessage om = (ObjectMessage) message; logger.info("ObjectMessage Created"); Student s = (Student) om.getObject(); logger.info("Student created"); logger.info(s.toString()); } catch (Exception e) { e.printStackTrace(); } finally { // set back the original TCCL Thread.currentThread().setContextClassLoader(originalTCCL); } logger.info("Object Message : "+st.toString()); {code} -------------------------------------------------------------- Reply to this message by going to Community [http://community.jboss.org/message/585000#585000] Start a new discussion in JBoss Messaging at Community [http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2042]
_______________________________________________ jboss-user mailing list [email protected] https://lists.jboss.org/mailman/listinfo/jboss-user
