< EclipseLink | Examples | JPA | Migration
Revision as of 16:22, 5 May 2008 by Michael.obrien.oracle.com (New page: ==Migrating to JBoss using EclipseLink as JPA provider== *These instructions are for users wishing to migrate EclipseLink to the JBoss container as well as possibly migrating from another ...)
Migrating to JBoss using EclipseLink as JPA provider
- These instructions are for users wishing to migrate EclipseLink to the JBoss container as well as possibly migrating from another persistence provider such as Hibernate.
There is an good example on jboss.org that we will use an example of how to migrate a small container managed web application from using Hibernate to using EclipeLink as the JPA provider.
- The following changes must be done to persistence.xml
@EJB Injection/JNDI lookup Modifications
- The @EJB injection annotation does not currently work outside of the EJB container - for example in the servlet container. The solution is to use a custom JNDI lookup.
EAR Packaging Modifications
- Dynamic weaving (byte-code instrumentation) is not currently available in JBoss 4.2.2 because of [ JIRA EJBTHREE-572]. Our workaround is to statically weave the entities by running the following Ant task before creating your EJB jar during EAR packaging. You must use the statically weaved classes if you would like to use LAZY 1-1 and many-1 functionality.
- See | JBoss predeploy workaround