Pierre De Rop created FELIX-5146:
------------------------------------
Summary: Service adapters turn on autoconf even if callbacks are
used
Key: FELIX-5146
URL: https://issues.apache.org/jira/browse/FELIX-5146
Project: Felix
Issue Type: Bug
Components: Dependency Manager
Affects Versions: org.apache.felix.dependencymanager-r6
Reporter: Pierre De Rop
Assignee: Pierre De Rop
Priority: Minor
Fix For: org.apache.felix.dependencymanager-r7
in the previous DM 3 version, when you specify a service adapter without an
autoconfig field and with some callbacks (and with or without a callback
instance object), then auto config mode (on fields in the adapter class) is
turned off.
This is good, because mixing callbacks and auto-config mode (on class fields)
may lead to bugs difficult to diagnose.
in dm4, there is a mistake: when you specify a service adapter without an
autoconfig field, but with callbacks on a callback instance, like this for
example:
{code}
ServiceAdapterCallbackInstance callbackInstance =
new ServiceAdapterCallbackInstance(e);
m.createAdapterService(OriginalService.class, null, null, /* no autoconfig
field */,
callbackInstance, "set", "changed","unset", null, true)
{code}
then the adapter class fields are auto-configured, even if no auto config class
field have been specified and if some callbacks have been specified.
We should go back to the previous DM 3 behavior, which makes more sense: if
some callbacks are defined and there is no autoconfig field, then do not enable
auto-config mode.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)