Posted this on stackoverflow but not much activity, re-posting here for help:
We have an application that is developed in Hibernate 3.6 and we need to deploy it onto a JBoss 4.0.5 app server for our client.
Due to the JBoss classloading flow, the hibernate library on our application is not loaded, instead the hibernate that is shipped together with JBoss is used, which causes a whole lot of issue.
A check on the tomcat jboss-service.xml reveal that the setting was modified:
<attributename="Java2ClassLoadingCompliance">true</attribute><!--modified--><attributename="UseJBossWebLoader">false</attribute><!--remained the same-->
With the Java2ClassLoadingCompliance set to true, is it possible for us to specify the classloading isolation in our application? We set the following settings in a jboss-web.xml in our application's WEB-INF directory referring to here (the application is deployed as a exploded-war):