Skip to main content

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.

Jump to: navigation, search

Difference between revisions of "EclipseLink/Examples/OSGi/Developing with EclipseLink OSGi in PDE"

m (Setup)
m (Setup)
Line 17: Line 17:
 
* Download Eclipse IDE with PDE
 
* Download Eclipse IDE with PDE
 
** A number of distributions include PDE including the Java EE, RCP, and Classic distributions.
 
** A number of distributions include PDE including the Java EE, RCP, and Classic distributions.
** Starting with the [http://www.eclipse.org/galileo Galileo release], EclipseLink is included in thee ''Eclipse IDE for Java EE Developers'' distribution.  If you download this distribution you do not need to download EclipseLink; the bundles are in the plugins folder of your Eclipse install.
+
** In [http://www.eclipse.org/galileo Galileo], EclipseLink is included in the ''Eclipse IDE for Java EE Developers'' distribution.  If you download this distribution you do not need to download EclipseLink; the bundles are in the plugins folder of your Eclipse install.
* Install EclipseLink JPA Bundles
+
 
** Select Help>Install New Software.. and in the Install dialog select the Galileo update site.  Select ''EclipseLink JPA'' which is in the ''EclipseRT Target Platform Components'' category.<br/>[[Image:EclipseLinkExamplesOSGiDeveloping_with_EclipseLink_OSGi_in_PDE-1.png]]
+
 
 +
* Install Required Bundles: EclipseLink JPA and JDBC. For the purposes of this example, we'll use the Apache Derby embedded database because the embedded database driver bundle is available along with EclipseLink from the Galileo update site.
 +
** Select Help>Install New Software.. and in the Install dialog select the Galileo update site.   
 +
** Select ''EclipseLink JPA'' which is in the ''EclipseRT Target Platform Components'' category.<br/>[[Image:EclipseLinkExamplesOSGiDeveloping_with_EclipseLink_OSGi_in_PDE-1.png]]
 +
** Select ''Apache Derby Core Feature''.  You may have to uncheck the "Group items by category" option to see this feature.<br/>[[Image:EclipseLinkExamplesOSGiDeveloping_with_EclipseLink_OSGi_in_PDE-2.png]]
 +
** Review the features you're installing to ensure you're getting both EclipseLink JPA and Derby.<br/>[[Image:EclipseLinkExamplesOSGiDeveloping_with_EclipseLink_OSGi_in_PDE-3.png]]
 
** After downloading, Eclipse will prompt you to restart.  Restart to complete the install.
 
** After downloading, Eclipse will prompt you to restart.  Restart to complete the install.
** You can confirm that EclipseLink JPA is installed using the Help>About Eclipse SDK menu and clicking the Installation Details button on the About dialog. <br/>[[Image:EclipseLinkExamplesOSGiDeveloping_with_EclipseLink_OSGi_in_PDE-2.png]]
+
** You can confirm that EclipseLink JPA and Derby are installed using the Help>About Eclipse SDK menu and clicking the Installation Details button on the About dialog.<br/>[[Image:EclipseLinkExamplesOSGiDeveloping_with_EclipseLink_OSGi_in_PDE-4.png]]
* Install JDBC Driver Bundle
+
** You will need a JDBC driver packaged as an OSGi bundle.  Orbit provides a bundle version of the Apache Derby embedded driver.  Download the org.apache.orbit bundle from Orbit.
+

Revision as of 18:09, 28 May 2009

Under Construction!

Developing with EclipseLink OSGi in PDE

NOTE: These instructions apply to the Galileo release.

EclipseLink is the the only comprehensive Java persistence framework that is designed for OSGi. EclipseLink is available as a set of OSGi bundles that can be used with any OSGi framework. Support is also available for byte code weaving of Entities when using Equinox.

This example illustrates how to develop a simple OSGi hello database application using Eclipse's Plug-in Development Environment (PDE) and EclipseLink.

Setup

  • Download Eclipse IDE with PDE
    • A number of distributions include PDE including the Java EE, RCP, and Classic distributions.
    • In Galileo, EclipseLink is included in the Eclipse IDE for Java EE Developers distribution. If you download this distribution you do not need to download EclipseLink; the bundles are in the plugins folder of your Eclipse install.


  • Install Required Bundles: EclipseLink JPA and JDBC. For the purposes of this example, we'll use the Apache Derby embedded database because the embedded database driver bundle is available along with EclipseLink from the Galileo update site.
    • Select Help>Install New Software.. and in the Install dialog select the Galileo update site.
    • Select EclipseLink JPA which is in the EclipseRT Target Platform Components category.
      EclipseLinkExamplesOSGiDeveloping with EclipseLink OSGi in PDE-1.png
    • Select Apache Derby Core Feature. You may have to uncheck the "Group items by category" option to see this feature.
      EclipseLinkExamplesOSGiDeveloping with EclipseLink OSGi in PDE-2.png
    • Review the features you're installing to ensure you're getting both EclipseLink JPA and Derby.
      EclipseLinkExamplesOSGiDeveloping with EclipseLink OSGi in PDE-3.png
    • After downloading, Eclipse will prompt you to restart. Restart to complete the install.
    • You can confirm that EclipseLink JPA and Derby are installed using the Help>About Eclipse SDK menu and clicking the Installation Details button on the About dialog.
      EclipseLinkExamplesOSGiDeveloping with EclipseLink OSGi in PDE-4.png

Back to the top