[
https://issues.apache.org/jira/browse/FELIX-1445?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738513#action_12738513
]
Felix Meschberger commented on FELIX-1445:
------------------------------------------
You are right, the test is wrong: If the component is enabled but not
unsatisifed, the serviceAdded method should just be ignored. Only if the
component is unsatisifed, that is activation has been tried but unsuccessful,
should the component be activated. Otherwise the event must be ignored (as it
was in before applying the patch from FELIX-1185 in Rev. 781045.
Reverting to testing for the UNSATISFIED state again should do the trick.
> When a component is deactivated due to the deactivation of a service to which
> it staticly 1..1 references, this component is not reactivated when that
> service is reregistered.
> -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: FELIX-1445
> URL: https://issues.apache.org/jira/browse/FELIX-1445
> Project: Felix
> Issue Type: Bug
> Components: Declarative Services (SCR)
> Affects Versions: scr-1.0.8
> Reporter: Agemo Cui
> Fix For: scr-1.2.0
>
>
> According to the comments in the method serviceAdded of class
> DependencyManager, it looks like the first "if" is to check the unsatisfied
> state.
> But there are 2 unsatisfied state: STATE_ENABLED and STATE_UNSATISFIED.
> So the first "if" should be as follows.
> if ( (m_componentManager.getState() &
> (AbstractComponentManager.STATE_ENABLED |
> AbstractComponentManager.STATE_UNSATISFIED)) != 0)
> And in the following "else if", the method "handleServiceEvent" is going to
> check the statisfied state.
> So "STATE_UNSATISFIED" should be removed from DependencyManager.STATE_MASK.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.