2014-09-25 55 views
0

我從JBoss 6升級到WildFly8。我的應用程序使用Hibernate 3.6,但WildFly 8綁定了Hibernate 4.我不想將我的Hibernate版本更改爲4.我如何告訴WildFly8在我的情況下使用其他版本的Hibernate。我試圖排除org.hibernate模塊,但它沒有幫助。wildfly8刪除(不包括)hibernate4並使用舊版本

回答

0

我設法通過在persistence.xml設置要做到這一點:

<properties> 
    <property name="jboss.as.jpa.providerModule" value="org.hibernate:3" /> 
</properties> 

和投入Wildfly org.hibernate.3

<resources> 
    <resource-root path="jipijapa-hibernate3-1.0.1.Final.jar"/> 
    <resource-root path="hibernate3-core.jar"/> 
    <resource-root path="hibernate3-commons-annotations.jar"/> 
    <resource-root path="hibernate3-entitymanager.jar"/> 
</resources> 

,當然我也有複製的文件。