I've written a configuration management agent which registers two trackers (one for ManagedService and one for ManagedServiceFactory) as well as being a configuration listener. I've hit a timing problem where all configurations associated with a ManagedServiceFactory are "not yet available" when the tracker gives service added notification. The configuration listener also isn't triggered later (which is not a surprise because the configuration being loaded is neither a deletion nor an update, which are the two events configuration listening supports). The tracker also doesn't get a modified service triggered. I've also looked at the dependency manager, but http://felix.apache.org/site/apache-felix-dependency-manager-getting-started.html says "only required configuration dependencies are supported" and my management agent needs to support zero, 1, or n configurations and doesn't know ahead of time what the situation will be.

I also looked at EventAdmin and established the management agent to listen to "everything", in the hopes that maybe there's some low level event that has the info I need. It gets org/osgi/framework/ServiceEvent/REGISTERED , org/osgi/service/log/LogEntry/LOG_DEBUG , org/osgi/framework/BundleEvent/STARTED , and org/osgi/framework/BundleEvent/RESOLVED, none of which correlate to what I need to listen on.

The obvious sort of kludgy approach is to create a timer/polling thread in the bundle that keeps refreshing to support configuration operations that take place outside of tracker and config listener operations, but I'm hoping there's a better approach.. some other listener or tracker type I don't know about?

-Jamie

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to