Introduction
Using a persistence architecture makes it easier to handle database transactions. The Java Persistence architecture (Java Persistence architecture) is a very good persistence option, and by using JPA you can no longer need to use complex SQL queries, worry about performance issues, and other potential programming errors. There are a lot of JPA persistence Provider available for application developers to choose from, such as WebSphere JPA,OPENJPA and Hibernate, and so on. The WebSphere application Server support configuration uses most of the JPA persistence Provider. This article takes the WebSphere JPA,OPENJPA and Hibernate as examples to describe how to use different JPA persistence Provider in the WebSphere application Server.
Introduction
Using a persistence architecture makes it easier to handle database transactions. The Java Persistence architecture (Java Persistence architecture) is a very good persistence option, and by using JPA you can no longer need to use complex SQL queries, worry about performance issues, and other potential programming errors.
IBM WebSphere Application Server V7 delivers the Java persistence API (JPA) 2.0 Feature Pack. The IBM JPA2.0 implementation, based on the Apache OpenJPA, contains important new standards-based features that improve development efficiency while providing additional APIs to increase application performance.
In addition to WebSphere JPA, there are many other JPA persistence Provider available for application developers to choose from, such as Openjpa,hibernat,eclipselink and so on. The WebSphere application Server support configuration uses most of the JPA persistence Provider. This article takes the WebSphere JPA,OPENJPA and Hibernate as examples to describe how to use different JPA persistence Provider in the WebSphere application Server.
Prerequisite
This article assumes that the reader is knowledgeable about JPA and understands openjpa,hibernate. For helpful background information, see Reference resources.
Import sample Application
We will use the WebSphere application Server 7.0.0.9, which has the JPA 2.0 Feature Pack installed, to the Rational application Developer (RAD) 7.5 for the development environment.
For simplicity, we will use an example of RAD 7.5 as an example application. First you need to import the sample application into RAD 7.5.
Start RAD7.5, open an empty workspace, click Help->samples, and on the left side of the pop-up panel, find samples->application SAMPLES->EJB->EJB 3.0 Counter Sample, click Import Sample, the example application will be imported into your workspace.
Figure 1. Start workspace
Figure 2. RAD 7.5 Help Panel