9 Replies Latest reply on Oct 22, 2012 3:49 PM by Scott Marlow

    Using hibernate version in war file instead of the one bundled in AS 7.1

    heapifyman heapifyman Newbie

      Hi,

       

      I'm using AS 7.1.1.Final and came across hibernate bug HHH-5209. Since it was fixed in hibernate 4.1.8-SNAPSHOT I wanted to try that out.

      So I included 4.1.8-SNAPSHOT in my pom.xml and the jars are correcly included in WEB-INF/lib. However, JBoss always uses its own hibernate version 4.0.1.

       

      I know I can replace the jars and adapt the module.xml files under JBOSS_HOME/modules/org/hibernate but I would have to do that for all JBoss instances, which is cumbersome, and also it does not allow me to use different hibernate versions in different wars on the same instance, right.

       

      I also know there is jboss-deployment-structure.xml but I'm not sure if it can be used to accomplish what I'm after. At least I couldn't figure out a way to tell JBoss to only use the hibernate version included in my war-file.

       

      Is there a way to get JBoss to use the hibernate version included in my war-file on a "per deployment" basis or is the only way to replace the jars in JBOSS_HOME/modules/org/hibernate ?

       

      Any hints would be appreciated.

      Thanks