Issue Details (XML | Word | Printable)

Key: JDO-417
Type: Improvement Improvement
Status: Resolved Resolved
Resolution: Fixed
Priority: Minor Minor
Assignee: Craig Russell
Reporter: Erik Bengtson
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
JDO

Make JDO jar an OSGI bundle

Created: 03/Sep/06 08:54 AM   Updated: 01/Jan/07 10:52 PM
Return to search
Component/s: api2
Affects Version/s: JDO 2 final
Fix Version/s: JDO 2 maintenance release 1

Time Tracking:
Not Specified

File Attachments:
  Size
Text File Licensed for inclusion in ASF works JDO-417.patch 2006-10-05 03:25 PM Craig Russell 0.6 kB

Resolution Date: 01/Jan/07 10:52 PM


 Description  « Hide
Enable easy usage of JDO in OSGi containers by making the JDO jar an OSGI bundle. The change is pretty simple, just add the below to the MANIFEST.MF

Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Java Data Objects
Bundle-SymbolicName: javax.jdo
Bundle-Version: 2.0.0
Export-Package: javax.jdo,
 javax.jdo.datastore,
 javax.jdo.identity,
 javax.jdo.listener,
 javax.jdo.spi
Bundle-Vendor: Apache


 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Erik Bengtson added a comment - 13/Sep/06 07:27 PM
one better defined....

Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Java Data Objects
Bundle-SymbolicName: javax.jdo
Bundle-Version: 2.0.0
Bundle-Localization: plugin
Export-Package: javax.jdo,
 javax.jdo.datastore,
 javax.jdo.identity,
 javax.jdo.listener,
 javax.jdo.spi
Bundle-Vendor: Apache
Import-Package: javax.transaction;resolution:=optional,
 javax.transaction.xa;resolution:=optional

Craig Russell added a comment - 13/Sep/06 07:37 PM
1. There are optional references to javax.transaction.Synchronization, that are only required if the user actually calls setSynchronization on the implementation instance that implements javax.jdo.Transaction. But it's not clear what value this adds to the bundle definition.

2. As far as I know, there is no reference anywhere in javax.jdo to javax.transaction.xa. What would be the purpose of including this reference?

3. Where did the Bundle-Version: 2.0.0 come from? There is no third digit in the official release. Wouldn't it be better to use Bundle-Version: 2.0?

Thanks for the information. Once we figure out the right content, we can apply changes to both manifests (JDO1 and JDO2).

Erik Bengtson added a comment - 13/Sep/06 08:06 PM
1) Import Package is for resolving classes whatever they are.

2) Indeed, xa package should not be there

3) 2.0.0 ? ops, should be 2.0. For completion: OSGI has major.minor.micro schema for versions, so if we set version "2.0" micro will default to 0, meaning 2.0.0.

Craig Russell added a comment - 05/Oct/06 03:25 PM
Please review this patch.

I've anticipated the release that this will be shipped with, 2.1.

I've removed references to import of the xa package.

Can someone provide a test case to see if it is effective in its intended use?

Craig Russell added a comment - 01/Jan/07 10:52 PM
svn commit -m "JDO-417 updated manifest for OSGi use" JDO20.MF
Sending JDO20.MF
Transmitting file data .
Committed revision 491669.

I still don't know if this fixes the issue. Will someone please verify it?