|
|
(150 intermediate revisions by 2 users not shown) |
Line 1: |
Line 1: |
− | =EclipseLink JPA Deployed on IBM WebSphere 7 using Eclipse WTP=
| + | [http://wiki.eclipse.org/EclipseLink/Examples/JPA/WebSphere_Web_Tutorial Original WebSphere 7 tutorial page for EclipseLink JPA] |
− | | + | |
− | <font color="red">Note: This tutorial' is under construction for the next week as of 20090115.</font>
| + | |
− | | + | |
− | | + | |
− | If you want to get a small web application running quickly on WebSphere 7.0 - the services provided by the '''Web Tools Project''' pluggin in the '''Eclipse IDE''' can take care of the deployment details and set the server into debug mode for you.
| + | |
− | | + | |
− | This basic example details how to use Eclipse to run/debug a minimum J2EE web application servlet using EclipseLink JPA as the persistence provider. The goal of this example is to detail the minimum steps required to run EclipseLink inside the [http://www.ibm.com/developerworks/downloads/ws/was/?S_TACT=105AGX28&S_CMP=DLMAIN&S_CMP=rnav IBM WebSphere Application Server 7.0] server using the Eclipse IDE. At this point no presentation/controller layer such as JSF, Spring or Struts will be used beyond a basic HttpServlet so we can concentrate on the the integration layer JPA setup.
| + | |
− | | + | |
− | The [http://wiki.eclipse.org/Dali DALI] project was used to generate Entities from a schema with sequences already populated.
| + | |
− | | + | |
− | ==Development Environment==
| + | |
− | '''Software:''' [http://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/ganymede/R/eclipse-jee-ganymede-win32.zip Eclipse IDE for Java EE 3.4 Ganymede SR 1] (Oct 2008 +) IBM J9 JRE 1.6.0 build 2.4 20080816_22093.
| + | |
− | | + | |
− | ==Prerequisites==
| + | |
− | ===<font color="green">Install Eclipse EE</font>===
| + | |
− | *I installed a clean version of Eclipse Ganymede 3.4 EE Edition (Oct 2008)
| + | |
− | | + | |
− | ===<font color="green">Install a Database</font>===
| + | |
− | | + | |
− | ===<font color="green">Install WebSphere 7.0</font>===
| + | |
− | I installed the commercial 7.0.0.1 version
| + | |
− | | + | |
− | ===Install WebSphere Eclipse 3.4 Server Plugin===
| + | |
− | The WebSphere 6.1 Eclipse WTP server plugin is not shipped by default with Eclipse (WebSphere 6.0 for JEE 1.4 is).
| + | |
− | *'''Note: The WebSphere 6.1 plugin for Eclipse WTP is currently being developed - see the following [http://bugs.eclipse.org/160220 Eclipse WTP enhancement request 160220 in progress].
| + | |
− | *We are not blocked from using Eclipse WTP to manage the WebSphere 6.1 server, but without this plugin we will need to attach manually to port 5005 of a running WebSphere server that was started in debug mode outside of the Eclipse IDE - we will use this alternate debug approach.
| + | |
− | | + | |
− | ==WebSphere Configuration Changes==
| + | |
− | | + | |
− | ==JNDI Datasource Setup==
| + | |
− | | + | |
− | ===Global Scoped Datasource Setup===
| + | |
− | | + | |
− | ==Persistence JAR location==
| + | |
− | ==EclipseLink JAR location==
| + | |
− | ==JDBC JAR location==
| + | |
− | ==Create J2EE application==
| + | |
− | ==Persistence.xml==
| + | |
− | ==Publish EAR==
| + | |
− | ===Validating the WebSphere/EclipseLink configuration===
| + | |
− | ===Without eclipselink.jar reference===
| + | |
− | ===With eclipselink.jar reference===
| + | |
− | ==Perform CRUD operations: JPQL insert and query==
| + | |
− | ===Browser Output===
| + | |
− | ==References==
| + | |
− | *See [[EclipseLink/UserGuide/Developing_JPA_Projects_%28ELUG%29|Developing JPA Projects]] in the EclipseLink User's Guide.
| + | |
− | | + | |
− | | + | |
− | Originated on build 20090115 - EclipseLink 1.1 M6 - Michael O'Brien
| + | |