felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marcel Offermans (JIRA)" <j...@apache.org>
Subject [jira] Commented: (FELIX-1278) DM/ AutoConfig is active event if setCallbacks method has been invoked
Date Sat, 25 Jul 2009 08:10:15 GMT

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

Marcel Offermans commented on FELIX-1278:
-----------------------------------------

Let me start by saying, I think you're right. Turning off AutoConfig when a user defines callbacks
would have helped (it saves him from having to do this himself).

The change I could make is that if setCallbacks() is invoked with at least one non-null argument,
AutoConfig becomes false (and it becomes true again if you pass all null arguments, because
that probably signals you no longer want callbacks to be invoked).

The biggest worry I have is breaking existing code that relies on the current behavior. I'm
not quite sure how big the problem is there, because I guess most people using callbacks will
now have these two lines of code anyway, and a change would only render the call to setAutoConfig()
obsolete (but harmless).

Summarizing it, I am leaning heavily towards changing this, which means changing the semantics
of the API, so it would require us to go to version 3.0.0. If anyone else wants to comment
on this, now is the time! :)

> 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/users@felix.apache.org/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.


Mime
View raw message