[ https://issues.apache.org/jira/browse/FELIX-5315?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15403425#comment-15403425 ]
Carsten Ziegeler commented on FELIX-5315: ----------------------------------------- [~djencks] Thanks for the quick fix, it seems to solve our problem and I can't see the IllegalStateException("Configuration Admin service has been unregistered") anymore. The java API of ServiceReference says: "A ServiceReference object may be shared between bundles and can be used to examine the properties of the service and to get the service object.", so I think we're good. We should definitely get out a 2.0.6 as quickly as possible, if we agree on this fix, I can do the release asap. > Unexpected release of ConfigurationAdmin service in > RegionConfigurationSupport > ------------------------------------------------------------------------------- > > Key: FELIX-5315 > URL: https://issues.apache.org/jira/browse/FELIX-5315 > Project: Felix > Issue Type: Bug > Components: Configuration Admin, Declarative Services (SCR) > Affects Versions: scr-2.0.4 > Reporter: James Watkins-Harvey > Assignee: David Jencks > Fix For: scr-2.0.6 > > > In commit 978a710, RegionConfigurationSupport has been modified to obtain the > ConfigurationAdmin service through the ConfigurationAdmin's bundle context > (in getConfigAdmin(), around line 633). However, services acquired through > that method are then released using the impersonated bundle's context (for > example in the finally block of configureComponentHolder(ComponentHolder), > around line 186, and the finally block of getConfigurationInfo(TargetedPID, > TargetedPID, ComponentHolder, BundleContext), around line 465). > This cause leak of service on the ConfigurationAdmin's bundle context, as > well as unexpected early release of services on impersonated bundle contexts, > causing an IllegalStateException("Configuration Admin service has been > unregistered") being thrown in > ConfigurationAdminImpl#getConfigurationManager(). -- This message was sent by Atlassian JIRA (v6.3.4#6332)