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

David Jencks resolved FELIX-4585.
---------------------------------

       Resolution: Fixed
    Fix Version/s: scr-1.8.2
         Assignee: David Jencks

Thanks for finding this, fixing it revealed several other problems with factory 
components. Fixed in revs r1615283 and r1615284

> SCR will create an additional component instance when 
> ComponentContext.enableComponent is called
> ------------------------------------------------------------------------------------------------
>
>                 Key: FELIX-4585
>                 URL: https://issues.apache.org/jira/browse/FELIX-4585
>             Project: Felix
>          Issue Type: Bug
>          Components: Declarative Services (SCR)
>            Reporter: BJ Hargrave
>            Assignee: David Jencks
>             Fix For: scr-1.8.2
>
>
> In the OSGi CT, the 
> testActivateDeactivate(org.osgi.test.cases.component.junit.DeclarativeServicesControl)
>  method tests that that component activate and deactivate methods are 
> properly called. It uses ComponentContext.disableComponent and 
> enableComponent to cause component instances to be disposed and created.
> If ComponentContext.enableComponent is called on an already enabled 
> component, SCR will improperly create an additional instance of the component.
> See the following log messages:
> org.osgi.test.cases.component.tb6.CcBcMapIntNS110@1048641931 activate
> org.osgi.test.cases.component.tb6.ContExp@339127939 activate
> configuration update org.osgi.test.cases.component.tb6.CcBcMapIntNS110
> configuration updated org.osgi.test.cases.component.tb6.CcBcMapIntNS110
> org.osgi.test.cases.component.tb6.CcBcMapIntNS110@1048641931 deactCcBcMapInt
> org.osgi.test.cases.component.tb6.CcBcMapIntNS110@855459426 activate
> enable org.osgi.test.cases.component.tb6.CcBcMapIntNS110
> enabled org.osgi.test.cases.component.tb6.CcBcMapIntNS110
> org.osgi.test.cases.component.tb6.CcBcMapIntNS110@232400695 activate
> We can see that CcBcMapIntNS110 is activated initially. Then in response to a 
> configuration change, the component instance is deactivated and a new 
> instance it activated. Then ComponentContext.enableComponent is called on the 
> already enabled component and another instance is created in error.
> This error is creating problems passing the OSGi CT.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to