[ 
https://issues.apache.org/jira/browse/FELIX-2344?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12872151#action_12872151
 ] 

Pierre De Rop commented on FELIX-2344:
--------------------------------------

The last commit from 
core/src/main/java/org/apache/felix/dm/impl/dependencies/ServiceDependencyImpl.java
 (revision r948403)
seems to partially resolve the problem.

Indeed, if an extra/required dependency is defined in the Service's init 
method, but if the dependency is not available at the time the dependency is 
added, then
the bind() method seems to not be called, while the start method is called.

> DM / callback method is not invoked when an extra dependency is defined 
> within an "init" component method.
> ----------------------------------------------------------------------------------------------------------
>
>                 Key: FELIX-2344
>                 URL: https://issues.apache.org/jira/browse/FELIX-2344
>             Project: Felix
>          Issue Type: Bug
>          Components: Dependency Manager
>            Reporter: Pierre De Rop
>         Attachments: sample.instancebound.tgz
>
>
> This issue applies to the trunk version of dependency manager.
> So, it seems that when a component defines custom dependencies from its 
> "init" method, then such extra dependencies only support auto configuration 
> mode, and not callbacks.
> I have attached to this issue a sample maven project which reproduces the 
> problem:
> In the sample, a "MyClient" component is defining (from its init() method) an 
> extra required dependency over a "MyService" service, using a "bind" 
> callback. So, the start() method is invoked, but the bind method has not been 
> called.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to