But JBAS 4.2.0 uses JBoss MQ not JBoss Messaging.
Or maybe you have de-installed JBoss MQ and installed JBoss Messaging? It wasn't clear from your post.
I am using JBoss Messaging.
Actually, this is seeming more like an EJB3 question, as I'm using that too... If you could move this question to that forum, I would appreciate it.
We only set the context classloader in one place and this is nowhere near any message delivery code.
We also unset is immediately afterwards in a finally, so I doubt it is the cause of your problem.
Earlier versions of JBM did set the context classloader in other places - what version are you using?
FWIW - I can see code in JBAS 4.2 (org.jboss.ejb.plugins.jms.JMSContainerInvoker::invoke) that sets the context classloader.
Well, the problem is not during the message processing, but during the transaction commit. Hibernate doesn't see the context classloader used in a transaction commit, because the transaction commit happens outside the message delivery handling. Or so I'm guessing.
Hi genman - did you solve this yet?
Sorry I didn't, I came up with a work around. And I'm filing a bug.
I'm certain this is part of the JBossAS side of things, and not to do with messaging.
Thanks for trying to help.