Concurrency Issues when components get stopped and restarted because of
configuration changes
---------------------------------------------------------------------------------------------
Key: FELIX-1175
URL: https://issues.apache.org/jira/browse/FELIX-1175
Project: Felix
Issue Type: Bug
Components: Declarative Services (SCR)
Affects Versions: scr-1.0.8
Environment: Felix 1.4.1, SCR 1.0.8, File Install 1.0.0, Configuration
Admin 1.0.10
Reporter: Thilo Planz
I am using SCR for declarative services, with File Install providing component
configuration via Configuration Admin.
When I update the *.cfg file, the components gets deactivated, reconfigured
and re-activated (I think).
As a result, other components using the component need to also be
"power-cycled".
I get the following exception:
[SCR Component Actor] ERROR org.apache.felix.scr - Unexpected problem executing
task
java.lang.IllegalStateException: The service registration is no longer valid.
at
org.apache.felix.framework.ServiceRegistrationImpl.getReference(ServiceRegistrationImpl.java:88)
at
org.apache.felix.framework.ServiceReferenceImpl.hashCode(ServiceReferenceImpl.java:87)
at java.util.HashMap.removeEntryForKey(HashMap.java:595)
at java.util.HashMap.remove(HashMap.java:584)
at java.util.Collections$SynchronizedMap.remove(Collections.java:1986)
at
org.apache.felix.scr.impl.DependencyManager.ungetService(DependencyManager.java:783)
at
org.apache.felix.scr.impl.DependencyManager.unbind(DependencyManager.java:926)
at
org.apache.felix.scr.impl.DependencyManager.close(DependencyManager.java:829)
at
org.apache.felix.scr.impl.ImmediateComponentManager.disposeImplementationObject(ImmediateComponentManager.java:296)
at
org.apache.felix.scr.impl.ImmediateComponentManager.deleteComponent(ImmediateComponentManager.java:150)
at
org.apache.felix.scr.impl.AbstractComponentManager.deactivateInternal(AbstractComponentManager.java:521)
at
org.apache.felix.scr.impl.AbstractComponentManager.access$200(AbstractComponentManager.java:36)
at
org.apache.felix.scr.impl.AbstractComponentManager$3.run(AbstractComponentManager.java:173)
at
org.apache.felix.scr.impl.ComponentActorThread.run(ComponentActorThread.java:85)
Also, the component is left in state "deactivating".
Id State Name
[ 6] [active ] ldap.ins <= COMPONENT RECEIVING NEW CONFIGURATION
[ 7] [deactivating ] servlet.googleSamlResponse <= COMPONENT USING
"ldap.ins"
There is no error if no one (in SCR scope) is using the reconfigured component.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.