< EclipseLink | Examples | JPA
EclipseLink JPA Development using NetBeans 6.9.1
- This page details how to develop applications using EclipseLink JPA in an environment that uses NetBeans as the IDE and GlassFish as the Java Enterprise application server.
- As of Feb 2011 NetBeans is released as version 6.9.1 which includes support for EclipseLink 2.0.1 as a JPA 2.0 provider on GlassFish 3.0.1 (Hibernate 3.2.5 as a JPA 1.0 provider is also supported).
- I have been able to run the beta version of Netbeans 7.0 that includes the GlassFish 3.1 server along with EclipseLink 2.2 and full JEE6 support (including JAX-RS 1.1, EJB 3.1 and JSF 2.0) with nothing but small minor issues.
- For this tutorial we can use either 6.9.1 or 7.0beta.
- The key point about Netbeans is the tight integration with GlassFish server. This is evident by the ease at which the wizards for JPA, JSF and WebServices allow us to write almost no template or configuration code - the Netbeans IDE takes care of this.
Differences between Netbeans 6.8/6.9 and 7.0
- EclipseLink 2.0.1
- Hibernate 3.2.5
- Spring MVC 2.5
- STruts 1.3.8
- EclipseLink 2.0.2
- EclipseLink 2.2
- Hibernate 3.2.5
- JSF 2.0
- primefaces is the JSF component suite (new to NB7 none is default)
- additional "enable contexts and DI" for web projects
- Spring MVC 3.0.2
- Struts 1.3.8
- There are two persistence libraries shipped with GlassFish V3 as part of NetBeans. The first thing we should do is upgrade the 6 bundles to the latest versions (and make sure to clear the felix OSGI cache - as in erase it from the filesystem)
- Update the single jar and the JPA 2.0 specification jar in Netbeans here
- You will likely want to regenerate the source as well, execute the following ant script off your 2.2 trunk view.
- Update the 6 OSGI bundles and the JPA 2.0 specification jar in GlassFish 3 here
C:\opt\nbglassfish301\glassfish\modules\org.eclipse.persistence.jpa.jar C:\opt\nbglassfish301\glassfish\modules\org.eclipse.persistence.jpa.modelgen.jar C:\opt\nbglassfish301\glassfish\modules\org.eclipse.persistence.core.jar C:\opt\nbglassfish301\glassfish\modules\org.eclipse.persistence.asm.jar C:\opt\nbglassfish301\glassfish\modules\org.eclipse.persistence.antlr.jar C:\opt\nbglassfish301\glassfish\modules\org.eclipse.persistence.oracle.jar C:\opt\nbglassfish301\glassfish\modules\javax.persistence.jar