Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
Difference between revisions of "EclipseLink/Examples/JPA"
m (→JPA Web Application Tutorials) |
m (→JPA Web Application Tutorials) |
||
Line 60: | Line 60: | ||
! Container | ! Container | ||
! Version | ! Version | ||
− | ! JEE | + | ! JEE Spec |
+ | ! Example Src | ||
! Issues | ! Issues | ||
|- | |- | ||
− | |[[EclipseLink/Examples/JPA/WebLogic_Web_Tutorial|Oracle WebLogic Server]]|| 10.0 / 10.3.3.1 || 5 || [[EclipseLink/Examples/JPA/WLS_AppScoped_DataSource| - See application-scoped datasource workaround]]. | + | |[[EclipseLink/Examples/JPA/WebLogic_Web_Tutorial|Oracle WebLogic Server]]|| 10.0 / 10.3.3.1 || 5 || - || |
+ | [[EclipseLink/Examples/JPA/WLS_AppScoped_DataSource| - See application-scoped datasource workaround]]. | ||
|- | |- | ||
− | |[[EclipseLink/Examples/JPA/OC4J_Web_Tutorial|Oracle OC4J]]|| 10.1.3 / 11.1.1 || 5 || - | + | |[[EclipseLink/Examples/JPA/OC4J_Web_Tutorial|Oracle OC4J]]|| 10.1.3 / 11.1.1 || 5 || - || - |
|- bgcolor="#d0efff" | |- bgcolor="#d0efff" | ||
|[[EclipseLink/Examples/JPA/GlassFishV2_Web_Tutorial|GlassFish]]|| V2.1 || 5 || - Requires GlassFish V2.1 build 32 | |[[EclipseLink/Examples/JPA/GlassFishV2_Web_Tutorial|GlassFish]]|| V2.1 || 5 || - Requires GlassFish V2.1 build 32 | ||
Line 72: | Line 74: | ||
|- | |- | ||
|- bgcolor="#d0efff" | |- bgcolor="#d0efff" | ||
− | |SUN Application Server || 9.1 || 5 || - See [[EclipseLink/Examples/JPA/GlassFishV2_Web_Tutorial|GlassFish V2 which is included in Sun AS 9]] | + | |SUN Application Server || 9.1 || 5 || - || - See [[EclipseLink/Examples/JPA/GlassFishV2_Web_Tutorial|GlassFish V2 which is included in Sun AS 9]] |
|- | |- | ||
− | |[[EclipseLink/Examples/JPA/GlassFishV3_Web_Tutorial|GlassFish]]|| V3 || 6 || - Use V3 [http://download.java.net/glassfish/v3/promoted prelude] - not TP2 | + | |[[EclipseLink/Examples/JPA/GlassFishV3_Web_Tutorial|GlassFish]]|| V3 || 6 || - || - Use V3 [http://download.java.net/glassfish/v3/promoted prelude] - not TP2 |
- Use the 1.0.9 snapshot plugin against a prelude server | - Use the 1.0.9 snapshot plugin against a prelude server | ||
|- | |- | ||
− | |[[EclipseLink/Examples/JPA/JBoss_Web_Tutorial|JBoss]] || 4.2.2 || 5 || - Dynamic weaving is disabled due to ([http://jira.jboss.com/jira/browse/EJBTHREE-572 JIRA-572]) - upcoming 5.0CR2 release (Oct 2008) will be fully JEE5 | + | |[[EclipseLink/Examples/JPA/JBoss_Web_Tutorial|JBoss]] || 4.2.2 || 5 || - || - Dynamic weaving is disabled due to ([http://jira.jboss.com/jira/browse/EJBTHREE-572 JIRA-572]) - upcoming 5.0CR2 release (Oct 2008) will be fully JEE5 |
- see [[EclipseLink/Examples/JPA/Migration/JBoss | static weaving workaround using the JBoss JSFEJB3 example]] | - see [[EclipseLink/Examples/JPA/Migration/JBoss | static weaving workaround using the JBoss JSFEJB3 example]] | ||
|- | |- | ||
− | |[[EclipseLink/Examples/JPA/Spring_Web_Tutorial|Spring]] || 2.5.5 || 5 || - '''Under Construction''' TBD: use the Derby database platform | + | |[[EclipseLink/Examples/JPA/Spring_Web_Tutorial|Spring]] || 2.5.5 || 5 || - || - '''Under Construction''' TBD: use the Derby database platform |
|- | |- | ||
− | ||[[EclipseLink/Examples/JPA/WebSphere_Web_Tutorial|IBM WebSphere]] || 6.1.0.0 || 1.4/5 || - Supports JPA1/EJB3 with optional feature pack on Java SE 1.5 | + | ||[[EclipseLink/Examples/JPA/WebSphere_Web_Tutorial|IBM WebSphere]] || 6.1.0.0 || 1.4/5 || - || - Supports JPA1/EJB3 with optional feature pack on Java SE 1.5 |
- The [http://bugs.eclipse.org/160220 WAS 6.1 Eclipse WTP Server plugin (ehr 160221)] is in progress - use may use manual or python deployment | - The [http://bugs.eclipse.org/160220 WAS 6.1 Eclipse WTP Server plugin (ehr 160221)] is in progress - use may use manual or python deployment | ||
|- bgcolor="#e0e0e0" | |- bgcolor="#e0e0e0" | ||
− | ||[[EclipseLink/Examples/JPA/WebSphereCE_Web_Tutorial|IBM WebSphere CE]] || 2.1.0.1 || 5 || - WebSphere CE 2.1 is only certified on Java SE 1.5 (SUN JRE 1.6 runtime support is available) | + | ||[[EclipseLink/Examples/JPA/WebSphereCE_Web_Tutorial|IBM WebSphere CE]] || 2.1.0.1 || 5 || - || - WebSphere CE 2.1 is only certified on Java SE 1.5 (SUN JRE 1.6 runtime support is available) |
|- bgcolor="#e0e0e0" | |- bgcolor="#e0e0e0" | ||
− | |Apache Geronimo || 2.0.2 || 5 || - see [[EclipseLink/Examples/JPA/WebSphereCE_Web_Tutorial|WebSphere CE]] which wraps Geronimo, Derby and OpenJPA | + | |Apache Geronimo || 2.0.2 || 5 || - || - see [[EclipseLink/Examples/JPA/WebSphereCE_Web_Tutorial|WebSphere CE]] which wraps Geronimo, Derby and OpenJPA |
|- | |- | ||
− | |[[EclipseLink/Examples/JPA/Tomcat_Web_Tutorial|Apache Tomcat]] || 6.0.18 || 5 (w/o EJB) || - 2.5 Servlet container will support application managed JPA entities using RESOURCE_LOCAL or JTA transactions. | + | |[[EclipseLink/Examples/JPA/Tomcat_Web_Tutorial|Apache Tomcat]] || 6.0.18 || 5 (w/o EJB) || - || - 2.5 Servlet container will support application managed JPA entities using RESOURCE_LOCAL or JTA transactions. |
- SessionCustomizer is required for JTA. | - SessionCustomizer is required for JTA. |
Revision as of 16:16, 8 October 2008
The following examples are provided to assist developers with their adoption and usage of EclipseLink's JPA and native ORM functionality. See Developing JPA Projects in the EclipseLink User's Guide for details.
EclipseLink JPA Examples/Tutorials
Basic
Diagnostics
- How to configure logging
- How to configure a third party custom logger
- How to validate metadata against the database
Mapping
- How to use an EclipseLink ORM.XML Mapping file
- How to configure primary key generation
- How to define inheritance
- How to map an Enum type to coded values
Querying
Java SE Examples
Rich Client Platform (RCP)
Spring JPA
Using Native ORM through JPA
Using Native EclipseLink ORM API
Tutorials
JPA Web Application Tutorials
- Step by step Instructions by Container for a basic JEE JPA Application
Container | Version | JEE Spec | Example Src | Issues |
---|---|---|---|---|
Oracle WebLogic Server | 10.0 / 10.3.3.1 | 5 | - | |
Oracle OC4J | 10.1.3 / 11.1.1 | 5 | - | - |
GlassFish | V2.1 | 5 | - Requires GlassFish V2.1 build 32
- Current Production Release | |
SUN Application Server | 9.1 | 5 | - | - See GlassFish V2 which is included in Sun AS 9 |
GlassFish | V3 | 6 | - | - Use V3 prelude - not TP2
- Use the 1.0.9 snapshot plugin against a prelude server |
JBoss | 4.2.2 | 5 | - | - Dynamic weaving is disabled due to (JIRA-572) - upcoming 5.0CR2 release (Oct 2008) will be fully JEE5
- see static weaving workaround using the JBoss JSFEJB3 example |
Spring | 2.5.5 | 5 | - | - Under Construction TBD: use the Derby database platform |
IBM WebSphere | 6.1.0.0 | 1.4/5 | - | - Supports JPA1/EJB3 with optional feature pack on Java SE 1.5
- The WAS 6.1 Eclipse WTP Server plugin (ehr 160221) is in progress - use may use manual or python deployment |
IBM WebSphere CE | 2.1.0.1 | 5 | - | - WebSphere CE 2.1 is only certified on Java SE 1.5 (SUN JRE 1.6 runtime support is available) |
Apache Geronimo | 2.0.2 | 5 | - | - see WebSphere CE which wraps Geronimo, Derby and OpenJPA |
Apache Tomcat | 6.0.18 | 5 (w/o EJB) | - | - 2.5 Servlet container will support application managed JPA entities using RESOURCE_LOCAL or JTA transactions.
- SessionCustomizer is required for JTA. - Only static weaving (instrumentation) is available. - No @EJB or @PersistenceContext injection is available. |
JPA Examples Matrix
- The following grid cross-references the above JPA JEE Tutorials by Application server, Database and type of presentation framework - to answer the question "How to run EclipseLink JPA on an application server against a particular database"?
Database --> | Oracle | MySQL | Derby | JavaDB | HSQL | DB2 Ex |
---|---|---|---|---|---|---|
WebLogic | Servlet | |||||
OC4J | Servlet | |||||
Glassfish | Servlet | |||||
Sun AS | Servlet | |||||
JBoss | Servlet | JSF | ||||
WebSphere | Servlet | |||||
Geronimo | ||||||
Tomcat | Servlet |
Under Construction
Mappings
Querying
- How to optimize searching using data projections
- How to optimize graph loading
- How to access EclipseLink's native API through JPA
Java SE Examples
- GeoNames Example (under development bug 227113)
Database Platform Extensions
- Oracle: Spatial, VPD/OLS, TIMESTAMP, XDB
Advanced
- Dynamic JPA Example: Example extension for JPA without Java classes and XML
Application Server specific
JBoss Seam
Integrating EclipseLink JPA with an IDE
The following tutorials describe details on running EclipseLink JPA on a specific Java IDE.
- Eclipse
- MyEclipse
- WebLogic Workshop
- IBM WebSphere Studio
- IBM Rational Application Developer 7.5
- Oracle JDeveloper
- IntelliJ IDEA
- SUN Java Studio (NetBeans)
- Borland JBuilder
Integrating EclipseLink JPA with a Database Platform
The following tutorials describe details on running EclipseLink JPA on a specific database platform.
- Oracle 11 on Tomcat 6,
- MySQL
- Derby on GlassFish V2 / Sun Application Server 9
- DB2 Express C 9.5 on IBM WebSphere CE
- JavaDB
- HSQL on JBoss