[
https://issues.apache.org/jira/browse/FELIX-322?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12510707
]
Felix Meschberger commented on FELIX-322:
-----------------------------------------
There were actually more issues with ConfigurationManager and Comparator than
met the eyes:
> The Comparator did not work at all correctly with the order flag
> The service.cmRanking property was used for comparison whereas the
service.ranking property should have been used
> The fallback check for the service.id property did not work as the service
ID is a Long not an Integer, which was assumed
> The ServiceTracker count was never updated locally leading to too much
service reacquisitions
> And of course the class cast issue reported by Tom
Fixed in Rev. 553930
> Registering a PersistenceManager service causes a ClassCastException
> --------------------------------------------------------------------
>
> Key: FELIX-322
> URL: https://issues.apache.org/jira/browse/FELIX-322
> Project: Felix
> Issue Type: Bug
> Components: Configuration Admin
> Reporter: Felix Meschberger
> Assignee: Felix Meschberger
> Fix For: 1.0.0
>
>
> When a Configuration object is requested and has to be loaded, the
> ConfigurationManager asks for the list of current PersistenceManagers. If a
> service has been registered, this list is being built and sorted according to
> service.cmRanking property of the registered PersistenceManagers. The
> Comparator used assumes the objects to be compared to be ServiceReference
> instances (to get at the service properties) while the actual objects are the
> services themselves. Hence the ClassCastException and hence a side effect of
> not being able to access configuration any more.
> Thanks to Tom Remoleur for reporting this.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.