[
https://issues.apache.org/jira/browse/FELIX-1278?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Pierre De Rop reopened FELIX-1278:
----------------------------------
Marcel,
I reopen this issue because, with the previous patch, the following code was
not working:
dm.add(createService()
.setImplementation(MyPojo.class)
.add(createServiceDependency()
.setRequired(false)
.setService(MyDependency.class)
.setAutoConfig(true)
.setCallbacks("added", "removed")));
(the setCallbacks turns off autoconfig and the setAutoConfig(true) is disabled).
The attached patch just check if the setAutoConfig method has been called or
not. If yes, then the setCallbacks method does not turn off autoconfig.
(I have also added some documentation in the setCallbacks method).
> DM/ AutoConfig is active event if setCallbacks method has been invoked
> ----------------------------------------------------------------------
>
> Key: FELIX-1278
> URL: https://issues.apache.org/jira/browse/FELIX-1278
> Project: Felix
> Issue Type: Bug
> Components: Dependency Manager
> Affects Versions: dependencymanager-2.0.1
> Environment: linux fc10/ jdk1.5/1.6
> Reporter: Pierre De Rop
> Assignee: Marcel Offermans
> Priority: Minor
>
> Marcel, in this issue, I come back to you about an old thread that I posted
> last november 2008 here ->
> http://www.mail-archive.com/[email protected]/msg02582.html
> In this thread, I mentioned a potential problem concerning AutoConfiguration:
> Indeed, AutoConfig is active by default, even if
> ServiceDependency.setCallbacks() method has been invoked. So, all Pojo's
> attributes (wich types are the same as the injected dependency) are overriden
> by reflexion (auto config mode).
> Currently, each time I call setCallbacks(), I must take care of calling
> setAutoConfig(false) ...
> We think that AutoConfig mode should be disabled when setCallbacks methods is
> invoked.
> /pierre
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.