6 Replies Latest reply on Aug 21, 2007 1:02 PM by Elias Ross

    ClassLoader issue with MDB and Hibernate

    Elias Ross Master


      The issue I see is that Hibernate can't load classes when it does a transaction commit, after a JMS message is processed in an MDB.

      See this thread:
      http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4068315

      When does Thread.setCurrentClassLoader() get called for messages being processed in an MDB?

      It seems this is somehow reset, perhaps post processing. JBoss AS /connector does not set the classloader. Looking at the Hibernate sources, Hibernate does not make this call. So I assume it's part of JBoss Messaging (the JmsSession), and it must get reset before transaction commit.

      Anyway, it's a definite bug, I just need to know where the bug is.