[ 
https://issues.apache.org/jira/browse/FELIX-5429?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Pierre De Rop resolved FELIX-5429.
----------------------------------
    Resolution: Fixed

Fixed in revision 1771506.

added FELIX5429_AspectSwapCallbackNotCalledForOptionalDepenency.java test case.

> Aspect swap callback sometimes not called on optional dependencies
> ------------------------------------------------------------------
>
>                 Key: FELIX-5429
>                 URL: https://issues.apache.org/jira/browse/FELIX-5429
>             Project: Felix
>          Issue Type: Bug
>          Components: Dependency Manager
>    Affects Versions: org.apache.felix.dependencymanager-r1
>            Reporter: Pierre De Rop
>            Assignee: Pierre De Rop
>            Priority: Minor
>             Fix For: org.apache.felix.dependencymanager-r9
>
>
> This issue concerns the following corner case scenario:
> You have a component A with a required dependency on "Required" service, and 
> an optional dependency on a "B" service.
> You have also an aspect for the "B" service.
> So, when A starts, it will be called in 
> - A.add(Required)
> - A.add(originalBService)
> - A.swap(originalBService, aspectForBService) // assuming the aspect is 
> started after B service and after A
> Now, there is a a ComponentStateListener on A which removes the B aspect when 
> the "A" component is stopping.
> So, the bug is the following: when you remove the "Required" Service, A is 
> called in :
> - A.remove(originalBService)
> - A.stop()
> so, here the A component should have been called like this 
> - A.swap(aspectForBService, originalBService)
> - A.remove(originalB)
> - A.stop()
> Here, the swap callback should be called because the state listening is 
> removing the aspect while A is stopping.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to