覆盖JBoss 4.0.5类加载流程

时间:2016-10-03 16:16:59

标签: hibernate classloader jboss-4.0.x

我们有一个在Hibernate 3.6中开发的应用程序,我们需要将它部署到我们客户端的JBoss 4.0.5应用服务器上。

由于JBoss类加载流程,我们的应用程序上的hibernate库没有被加载,而是使用了与JBoss一起提供的hibernate,这导致了很多问题。

对tomcat jboss-service.xml的检查显示该设置已被修改:

<attribute name="Java2ClassLoadingCompliance">true</attribute> <!--modified-->
<attribute name="UseJBossWebLoader">false</attribute> <!--remained the same-->

Java2ClassLoadingCompliance设置为true,我们是否可以在应用程序中指定类加载隔离?我们在应用jboss-web.xml的{​​{1}}目录中的WEB-INF中设置了以下设置,引用了here(应用程序部署为爆炸式战争):

<jboss-web>
   <class-loading java2ClassLoadingCompliance="false">
      <loader-repository>
         org.hibernate:archive=OurApplication.war
         <loader-repository-config>java2ParentDelegation=false</loader-repository-config>
      </loader-repository>
   </class-loading>
</jboss-web>

但是配置没有效果。

非常感谢任何输入。

0 个答案:

没有答案