Issue Details (XML | Word | Printable)

Key: OSGI-575
Type: Improvement Improvement
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Costin Leau
Reporter: Olof Jönsson
Votes: 0
Watchers: 0
Operations

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

ServiceReference extends Comparable in OSGi R4.1, breaks build

Created: 13/Jul/08 10:43 PM   Updated: 25/Jul/08 04:30 PM
Component/s: CORE
Affects Version/s: 1.1
Fix Version/s: 1.1.1

Time Tracking:
Original Estimate: 0.12d
Original Estimate - 0.12d
Remaining Estimate: 0.12d
Remaining Estimate - 0.12d
Time Spent: Not Specified
Remaining Estimate - 0.12d

File Attachments: 1. Text File OSGI-575 (2).patch (4 kB)
2. Text File OSGI-575 (3).patch (6 kB)
3. Text File OSGI-575.patch (2 kB)

Environment: Equinox 3.3.2


 Description  « Hide
The org.osgi.framework.ServiceReference interface in R4.1 of OSGi extends java.lang.Comparable. There are three classes in CORE that implements ServiceReference:

org.springframework.osgi.service.importer.support.internal.aop.StaticServiceReferenceProxy
org.springframework.osgi.service.importer.support.internal.aop.SwappingServiceReferenceProxy
org.springframework.osgi.service.importer.support.ServiceReferenceDelegate

These need to be modified to implement the compareTo method.

Fortunately, this is quite straight-forward as they are all wrappers of an inner ServiceReference which they can forward to.

 All   Comments   Work Log   Change History   FishEye   Builds      Sort Order: Ascending order - Click to sort in descending order
Olof Jönsson added a comment - 13/Jul/08 11:10 PM
Patch for fixing this in the aforementioned classes

Olof Jönsson added a comment - 13/Jul/08 11:16 PM
The change is mentioned in chapter 5.11 of the OSGi Service Platform Core Specification Release 4, Version 4.1

Olof Jönsson added a comment - 14/Jul/08 09:24 AM
This patch replaces the earlier patch and fixes the MockServiceReference from the mock module as well

Olof Jönsson added a comment - 14/Jul/08 01:43 PM

Olof Jönsson added a comment - 15/Jul/08 03:35 PM
See also #OSGI-582 (http://jira.springframework.org/browse/OSGI-582) whose patch obsoletes the changes of this patch for the core module.




Olof Jönsson added a comment - 15/Jul/08 03:55 PM
Just realized that I solved my problem but caused problems for everyone else sin I made it not build on non-R4.1 platforms by just forwarding the compareTo(). This patch uses the existing ServiceReferenceComparator for comparison and is therefore usable for all of us.