Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » [cm] ManagedServiceFactory.update(...) called multiple times with same configuration
[cm] ManagedServiceFactory.update(...) called multiple times with same configuration [message #755080] Mon, 07 November 2011 10:08 Go to next message
Carsten Saathoff is currently offline Carsten SaathoffFriend
Messages: 2
Registered: November 2011
Junior Member
We are using ConfigurationAdmin and ManagedServiceFactories to provide several instances of a service with different configurations. When starting our product, several config files are read and (factory)configs are published using ConfigurationAdmin. This works locally on my Mac Book Pro perfectly. However, when deploying the same product on our server (running Debian stable), I encountered the problem that our ManagedServiceFactories are called multiple times with the same configuration. I checked our startup code, and each configuration is published only once, nevertheless the facotry is called multiple times.

One observation I made is that the generated PID for the service configuration looks strange. Usually the pids are generated by concatenating <factoryPid>-<timestamp>-<counter>, where the counter is monotonically increasing. On our server, however, the redundant configurations all have the same value for the counter, only the timestamp increases.

I had a look at the equinox.cm bundles, and I was not able to spot an obvious problem, neither I am sure that this is a bug or whether I misunderstood anything about ConfigurationAdmin and ManagedServiceFactories. Therefore I wanted to know wheter this behaviour is expected and I have to handle it in my code (which would be possible) or whether this is indeed unwanted behaviour and a bug should be filed?

Thanks for any insights

Carsten

[Updated on: Mon, 07 November 2011 11:22]

Report message to a moderator

Re: [cm] ManagedServiceFactory.update(...) called multiple times with same configuration [message #755388 is a reply to message #755080] Tue, 08 November 2011 10:44 Go to previous message
Carsten Saathoff is currently offline Carsten SaathoffFriend
Messages: 2
Registered: November 2011
Junior Member
OK, I found out that the bug is indeed a feature. The redundant factory configuration I see are actually configurations that are stored in the persistent storage area. I am "fixing" this feature now using "-clean" to start the framework. In general I think having an option that turns off persistent configurations would be preferable as -clean also deletes bundle state and other things not related to config admin (AFAIK).

Previous Topic:EclipseRT-OSGi-StarterKit Vs equinox-SDK
Next Topic:a few questions about the new gogo shell and the old
Goto Forum:
  


Current Time: Fri Apr 19 13:43:48 GMT 2024

Powered by FUDForum. Page generated in 0.01855 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top