JBoss 5.1: Hibernate with JPA

后端 未结 2 1060
太阳男子
太阳男子 2021-01-05 12:50

I\'ve got two questions to ask regarding JBoss 5.1. We are in process of migrating from JBoss 4.2 to JBoss 5.1.

We are also using Java 1.6 and JPA 2.0 with Hibernat

2条回答
  •  青春惊慌失措
    2021-01-05 13:31

    Do this:

    1) Add jboss-classloading.xml to /src/main/webapp (I am using Maven):

    content:

    
    
    
    
    
    

    2) Modify $JBOSS_INSTALL_DIRECTORY/jboss-as/server/$PROFILE/conf/bootstrap/deployers.xml, and add the following at the end:

    
    

    3) Create a file JBOSS-IGNORE.TXT in the META-INF folder with following content:

    WEB-INF/classes/META-INF/persistence.xml

    4) I've renamed my persistence.xml to spring-persistence.xml and added this file in the context.xml as:

    
          
               ....
    
    

    5) I;ve also modified the spring-persistence.xml (saved persistence_2_0.xsd in webapp\META-INF folder) as

     
    ....
    
    

提交回复
热议问题