Tuomas Kiviaho created FELIX-4064:
-------------------------------------

             Summary: Potential clash with callback naming on adapter/aspect 
services
                 Key: FELIX-4064
                 URL: https://issues.apache.org/jira/browse/FELIX-4064
             Project: Felix
          Issue Type: Bug
          Components: Dependency Manager
    Affects Versions: dependencymanager-3.1.0
            Reporter: Tuomas Kiviaho
            Priority: Minor


Adapter/Aspect services base themselves over AbstractDecorator which has 
substantial amount of template callbacks that might clash with user defined 
callbacks such as added(ServiceReference, Object) which will always precede 
added(Foobar). This can be quite puzzling with annotations that in other 
frameworks are also available at runtime and thus can participate to method 
resolving.

I suggest to look whether or not AbstractDecorator could be split so that there 
would be only those methods available that make sense (bundle adapter doesn't 
need url callbacks for instance) and rename the remaining callbacks to begin 
with reserved word ('dm_' or something similar). 

User is able to create such a mess even without using adapter/aspect services 
just by parameterizing one callback method similarly so I think it would be 
wise if DM would break at runtime (hopefully at already at component 
declaration time) in case of ambiguous method match or at least best-match 
method algorithm would be altered so that it would favor the type of service 
instead of processing different parameter combinations sequentially as it does 
now.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to