You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "David Jencks (JIRA)" <ji...@apache.org> on 2014/08/06 04:02:11 UTC
[jira] [Updated] (FELIX-4585) SCR will create an additional
component instance when ComponentContext.enableComponent is called
[ https://issues.apache.org/jira/browse/FELIX-4585?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
David Jencks updated FELIX-4585:
--------------------------------
Fix Version/s: (was: scr-1.8.2)
scr-2.0.0
> 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-2.0.0
>
>
> 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)