[
https://issues.apache.org/jira/browse/FELIX-5403?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15653955#comment-15653955
]
Dobias van Buuren commented on FELIX-5403:
------------------------------------------
Hi Pierre,
Yes I'm aware of the fact that DM can inject the ServiceRegistration
automatically for me, but in my particular situation, we need the service.id of
the component in the start lifecycle. As I mentioned earlier, the
ServiceRegistration.getReference() method returns NULL because the service is
not registered in the service registry yet. Therefore the "started" callback
from ComponentStateListener was used because at this point, a valid
ServiceReference can be obtained for the service. This provides us access to
the service properties, so the service.id can be retrieved.
I'll test your solution later. At the moment I'm facing some other "challenges"
migrating our application from DM 3 to DM 4.
> Improve the Javadoc for org.apache.felix.dm.ComponentStateListener
> ------------------------------------------------------------------
>
> Key: FELIX-5403
> URL: https://issues.apache.org/jira/browse/FELIX-5403
> Project: Felix
> Issue Type: Improvement
> Components: Dependency Manager
> Affects Versions: org.apache.felix.dependencymanager-r8
> Reporter: Dobias van Buuren
> Assignee: Pierre De Rop
>
> The class level javadoc in org.apache.felix.dm.ComponentStateListener still
> mentiones the methods from the DM 3 version of the ComponentStateListener
> interface (starting, started, stopping and stopped).
> Those methods aren't available anymore in the DM 4 version.
> It would be nice if this gets corrected in a newer version, because it is not
> trivial what the alternatives in org.apache.felix.dm.ComponentState are.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)