Jump to: navigation, search

EclipseLink/Development/EclipseLinkPDEConversionPlan

Requirements

  1. Provide PDE projects for EclipseLink bundle development
  2. Publish EclipseLink bundles
  3. Allow users that do not want to use OSGi to continue to work in an understandable manner
  4. Allow EclipseLink Developers who are not using OSGI to continue to work in an understandable manner
  5. Allow current test set to run

Plan

The conversion will be done in multiple phases

  1. An initial conversion to PDE projects
  2. Tidy up the converted projects to they actually run in OSGI
  3. Make the ant-based nightly build system produce and publish bundles
  4. Add automated testing

Phase 1 - Initial Conversion

External Dependencies

At the moment, libraries we depend on are stored in *.*.lib directories. e.g. dbws/eclipselink.dbws.lib, foundation/eclipselink.core.lib, moxy/eclipselink.moxy.lib, sdo/eclipselink.moxy.lib. These directories will be removed in the third part of the project. For the time being, the new bundles will be checked in as listed below.

Each jar in those libraries will now be individually packaged as a bundle. The following is the list


Dependency Bundle Name New Location Depends On From Note
dbws - wsdl4j.jar javax.wsdl 1.6.2 dbws/plugins Existing Jar
dbws - saaj-api-1.3.jar javax.xml.soap 1.3 dbws/plugins Existing Jar
foundation - activation.jar javax.activation 1.1.0 plugins Orbit
foundation - ejb.jar javax.ejb 3.0 plugins javax.transaction, javax.xml.rpc Existing Jar
foundation - jms.jar javax.jms 1.1 plugins Existing Jar
foundation - mail.jar javax.mail 1.4.0 plugins Orbit
foundation - persistence.jar javax.persistence 1.0 plugins Existing Jar This is one of 2 peristence jars - see below
foundation - persistence.jar javax.persistence 1.99 jpa/plugins New persistence.jar with suggested JPA 2.0 changes
foundation - connector.jar javax.resource 1.5 plugins Existing Jar
foundation - jta.jar javax.transaction 1.1 plugins Existing Jar
moxy - jaxb-api.jar javax.xml.bind 2.0 moxy/plugins Existing Jar
moxy - jaxb-impl.jar no bundle utils/eclipselink.utils.jaxb Existing Jar These are tools shipped with the installer, moving to utils component
moxy - jaxb-xjc.jar no bundle utils/eclipselink.utils.jaxb Existing Jar These are tools shipped with the installer, moving to utils component
javax.xml.rpc(new) javax.xml.rpc 1.1.0 plugins Orbit javax.ejb has a dependency on this so we added it
foundation - jms.jar javax.jms 1.1 plugins Existing Jar
foundation - jsr173_1.0_api.jar javax.xml.stream 1.0 plugins Existing Jar
foundation - ant.jar org.apache.ant 1.7.0 plugins Orbit Newer version from Orbit
sdo - commonj.sdo.jar commonj.sdo 2.1 sdo/plugins Existing Jar

EclipseLink Bundles

For the time being, only the runtime components of EclipseLink will be bundled. The testing and utils will be distributed in the same way as they are currently distributed. The following are the bundles:

Component Bundle Name New Location Depends On Note
ASM org.eclipse.persistence.asm 0.1 plugins
ANTLR org.eclipse.persistence.antlr 0.1 plugins
Core org.eclipse.persistence.core 0.1 foundation/org.eclipse.persistence.core javax.activation, javax.ejb, javax.jms, javax.mail, javax.persistence, javax.resource, javax.transaction, javax.xml.bind, javax.xml.stream, org.apache.ant, org.eclipse.persistence.asm, org.eclipse.persistence.antlr dependencies are optional, reexports all but antlr, can depend on either version of javax.persistence
JPA org.eclipse.persistence.jpa 0.1 jpa/org.eclipse.persistence.jpa org.eclipse.persistence.core Can depend on either version of javax.persistence
MOXy org.eclipse.persistence.moxy 0.1 moxy/org.eclipse.persistence.moxy org.eclipse.persistence.core
Oracle Extensions org.eclipse.persistence.oracle 0.1 foundation/org.eclipse.persistence.oracle org.eclipse.persistence.core, Oracle Libraries Undecided about best way to depend on Oracle Libraries
SDO org.eclipse.persistence.sdo 0.1 sdo/org.eclipse.persistence.sdo org.eclipse.persistence.core, commondj.sdo work to make code base OSGI compatible is happening concurrently
DBWS org.eclipse.persistence.dbws 0.1 dbws/org.eclipse.persistence.dbws org.eclipse.persistence.core, javax.wsdl, javax.xml.soap currently some build errors in this part of the code base DBWS code update is coming soon

Non-bundled EclipseLink Projects

All remaining projects will remain as non-PDE projects. The only changes will be to allow them to compile based on any changes to the projects they depend on.

Eclipse Run Targets

As many as possible of the Eclipse Run targets packaged in the current SVN repository will be redefined to fit the new PDE projects

Open Questions

  1. What is the best way to package the Oracle-specific dependencies to allow both plugin and non-plug-in implementations to work?
  2. Version numbering for javax.persistence and eclipselink projects needs some review

Phase 2 - Running in OSGI

Activators will be added to the following projects based on the activators currently available in the OSGI SVN branch

  • org.eclipse.persistence.jpa
  • javax.persistence 1.99

In addition, the osgi core classes will be added to our plug-ins directory for use in compiling the new activators

Initial testing will be through use of the demos available in the OSGI SVN branch. Automated testing will be addressed after the the initial conversion is complete.

Phase 3 - Nightly Build conversion

This phase of the project will make our nightly build generate consumable OSGI bundles. (Note: I changed the directory our PDE projects are stored in to be called "plugins" instead of "lib")

Bundles

The end goal is to distribute all our bundles on an update site. Until that is available, the bundles we depend on will be stored in our SVN repository in various plugins directories. Below is an overview of the various plugins directories and what they will contain:

trunk/plugins - this is where we store dependencies that are required by multiple projects

  • javax.activation (PDE project and plug-in jar)
  • javax.ejb (PDE project and plug-in jar)
  • javax.jms (PDE project and plug-in jar)
  • javax.mail (PDE project and plug-in jar)
  • javax.persistence 1.0.0 (PDE project and plug-in jar)
  • javax.resource (PDE project and plug-in jar)
  • javax.transaction (PDE project and plug-in jar)
  • javax.xml.rpc (PDE project and plug-in jar)
  • javax.xml.soap (PDE project and plug-in jar)
  • javax.xml.stream (PDE project and plug-in jar)
  • org.apache.ant (PDE project and plug-in jar)
  • org.eclipse.persistence.antlr (PDE project and plug-in jar)
  • org.eclipse.persistence.asm (PDE project and plug-in jar)
  • osgi.core (plug-in jar) - needed for ant compile

trunk/foundation/plugins

  • org.eclipse.persistence.core (plug-in jar)
  • org.eclispe.persistence.oracle (plug-in jar)

trunk/dbws/plugins

  • org.eclipse.persistence.dbws (plug-in jar)
  • javax.wsdl (PDE project and plug-in jar)

trunk/jpa/plugins

  • org.eclipse.persistence.jpa (plug-in jar)
  • javax.persistence 1.99 (PDE project and plug-in jar)

trunk/moxy/plugins

  • org.eclipse.persistence.moxy (plug-in jar)
  • javax.xml.bind (PDE project and plug-in jar)

trunk/sdo/plugins (PDE project and plug-in jar)

  • org.eclipse.persistence.sgo (plug-in jar)
  • commonj.sdo (PDE project and plug-in jar)

Build system

The ant build system will be altered to make use of the plug-in jars listed above instead of the jar files that are currently checked into the *.*.lib directories. Those *.*.lib directories will be removed

Zip distribution

The zip distribution will remain the same except that the jars we ship as dependencies will be changed to use the bundle jars and the scripts will be updated to use the new jar names. Since the bundle jars are designed to work outside of OSGI, with the exception minor name changes, this will be transparent to the customer. The following jars will be changed:

  • activation.jar becomes javax.activation_1.1.0.jar
  • commonj.sdo.jar becomes commonj.sdo_2.1.0.jar
  • jaxb-api.jar becomes javax.xml.bind_2.0.0.jar
  • jsr173_1.0_api.jar becomes javax.xml.stream_1.0.0.jar
  • mail.jar becomes javax.mail_1.4.0.jar
  • persistence.jar becomes javax.persistence_1.0.0.jar

The following libraries will not change:

  • eclipselink.jar - non osgi EclipseLink
  • eclipselinkmw.jar - Mapping Workbench
  • package-rename.jar - Package Renamer
  • elmwcore.jar - Mapping Workbench
  • xercesImpl.jar - Mapping Workbench dependency
  • connector.jar - Mappign Workbench dependency
  • jaxb-impl.jar - Shipped as a tool
  • jaxb-xjc.jar - Shipped as a tool

Phase 4 - Add Automated Testing

More to come...

References

Building EclipseLink - page is being updated during this process.