Migrating app from Glassfish to JBoss
I have trying to port app written for Glassfish to JBoss Wildfly, since i met numerous issues with Glassfish. The default JPA impl for Glassfish is EclipseLink, while for Wildfly it is hibernate. I wanted to keep using EclipseLink in Wildfly.
1. Download eclipselink. http://www.eclipse.org/eclipselink/downloads/
2. Unzip it, copy the eclipselink.jar to modules/system/layers/base/org/eclipse/persistence/main
3. Update module.xml in the directory to reflect the change:
Make sure to match the exact name of the jar file in module.xml. If the jar file includes version numbers, for example, this should be reflected in module.xml file.
3. Execute the following while Wildfly is running:
jboss-cli.sh --connect '/system-property=eclipselink.archive.factory:add(value=org.jipijapa.eclipselink.JBossArchiveFactoryImpl)'
Or alternatively, modify standalone.xml to add the following:
4. Add the following dependence to pom.xml. Make sure the version matches the version of eclipselink jar you copied in Wildfly directory in step 2.
5. Define the provider for eclipselink in persistence.xml
Note that if the provider tag in persistence.xml is removed, then the app server will fallback to the default JPA implementation, which is hibernate for Wildfly and eclipselink for Glassfish.
1. Download eclipselink. http://www.eclipse.org/eclipselink/downloads/
2. Unzip it, copy the eclipselink.jar to modules/system/layers/base/org/eclipse/persistence/main
3. Update module.xml in the directory to reflect the change:
Make sure to match the exact name of the jar file in module.xml. If the jar file includes version numbers, for example, this should be reflected in module.xml file.
3. Execute the following while Wildfly is running:
jboss-cli.sh --connect '/system-property=eclipselink.archive.factory:add(value=org.jipijapa.eclipselink.JBossArchiveFactoryImpl)'
4. Add the following dependence to pom.xml. Make sure the version matches the version of eclipselink jar you copied in Wildfly directory in step 2.
5. Define the provider for eclipselink in persistence.xml
Note that if the provider tag in persistence.xml is removed, then the app server will fallback to the default JPA implementation, which is hibernate for Wildfly and eclipselink for Glassfish.