4.3.2. Migrate the Seam 2.2 JPA Example to JBoss EAP 6
The following task list summarizes the changes needed to successfully migrate the Seam 2.2 JPA example application to JBoss EAP 6. This example application can be found in the latest JBoss EAP 5 distribution under EAP5.x_HOME/jboss-eap-5.x/seam/examples/jpa/
Important
Procedure 4.6. Migrate the Seam 2.2 JPA Example
Remove the jboss-web.xml file
Remove thejboss-web.xmlfile from thejboss-seam-jpa.war/WEB-INF/directory. The class loading defined in thejboss-web.xmlis now the default behavior.Modify the
jboss-seam-jpa.jar/META-INF/persistence.xmlfile as follows.- Remove or comment out the
hibernate.cache.provider_classproperty in thejboss-seam-jpa.war/WEB-INF/classes/META-INF/persistence.xmlfile:<!-- <property name="hibernate.cache.provider_class" value="org.hibernate.cache.HashtableCacheProvider"/> -->
- Add the provider module property to the
jboss-seam-booking.jar/META-INF/persistence.xmlfile:<property name="jboss.as.jpa.providerModule" value="hibernate3-bundled" />
- Change the
jta-data-sourceproperty to use the default JDBC datasource JNDI name:<jta-data-source>java:jboss/datasources/ExampleDS</jta-data-source>
Add Seam 2.2 dependencies
Copy the following JARs from the Seam 2.2 distribution library,SEAM_HOME/lib/, into thejboss-seam-jpa.war/WEB-INF/lib/directory:- antlr.jar
- slf4j-api.jar
- slf4j-log4j12.jar
- hibernate-entitymanager.jar
- hibernate-core.jar
- hibernate-annotations.jar
- hibernate-commons-annotations.jar
- hibernate-validator.jar
Create a jboss-deployment-structure file to add remaining dependencies
Create ajboss-deployment-structure.xmlfile in thejboss-seam-jpa.war/WEB-INF/folder containing the following data:<jboss-deployment-structure> <deployment> <exclusions> <module name="javax.faces.api" slot="main"/> <module name="com.sun.jsf-impl" slot="main"/> <module name="org.hibernate" slot="main"/> </exclusions> <dependencies> <module name="org.apache.log4j" /> <module name="org.dom4j" /> <module name="org.apache.commons.logging" /> <module name="org.apache.commons.collections" /> <module name="javax.faces.api" slot="1.2"/> <module name="com.sun.jsf-impl" slot="1.2"/> </dependencies> </deployment> </jboss-deployment-structure>
The Seam 2.2 JPA example application deploys and runs successfully on JBoss EAP 6.

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.