Hey (again),

i am a bit puzzled with a IllegalStateException when interacting with Felix
ConfigAdmin via DS:

Daemon Thread [CM Event Dispatcher (Fire ConfigurationEvent:
pid=xxxx.ConnectionPid)] (Suspended (entry into method dispose in
ConfigurationAdminImpl))

                ConfigurationAdminImpl.dispose() line: 56

                ConfigurationAdminFactory.ungetService(Bundle,
ServiceRegistration, Object) line: 63

                ServiceRegistrationImpl.ungetFactoryUnchecked(Bundle,
Object) line: 388

                ServiceRegistrationImpl.ungetService(Bundle, Object) line:
286

                ServiceRegistry.ungetService(Bundle, ServiceReference<?>,
Object) line: 470

                Felix.ungetService(Bundle, ServiceReference, Object) line:
3711

                BundleContextImpl.ungetService(ServiceReference<?>) line:
483


ComponentRegistry$3(RegionConfigurationSupport).getConfigurationInfo(TargetedPID,
TargetedPID, ComponentHolder<?>, BundleContext) line: 465


ComponentRegistry$3(RegionConfigurationSupport).configurationEvent(ConfigurationEvent)
line: 259

                ConfigurationManager$FireConfigurationEvent.sendEvent(int)
line: 2046

                ConfigurationManager$FireConfigurationEvent.run() line:
2014

                UpdateThread.run() line: 103

                Thread.run() line: 745



Here is what I have:
https://gist.github.com/tonit/8a4c7b118a5ac282313f49f509f9990f

Now, with
https://gist.github.com/tonit/8a4c7b118a5ac282313f49f509f9990f#file-updaterimpl-java
we get the IllegalStateException upon 2nd call to updateConfig..

With
https://gist.github.com/tonit/8a4c7b118a5ac282313f49f509f9990f#file-updaterimplalternative-java
we
do not get the problem.

So, is this the intended way do this? Just lookup the configuration once
and keep using it?
What if i do need to get another configurationPid? I guess the ConfigAdmin
would again give that Exception.

Thanks,
Toni

*Toni Menzel*


*Developing The Rebaze Way*

*www.rebaze.de <http://www.rebaze.de/> | www.rebaze.com
<http://www.rebaze.com/> | @rebazeio <https://twitter.com/rebazeio>*

Reply via email to