[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [virgo-dev] Configuration of bundles
- From: Dmitry Sklyut <dmitry@xxxxxxxxxxx>
- Date: Tue, 2 Nov 2010 15:02:11 -0400
- Delivered-to: email@example.com
Simple answer is "Yes".
With the code sample that you provided, your config properties file must be named: "my_unique_pid.properties".
Drop that file into pickup and it will be deployed as ConfigurationAdmin configuration and your ManagedService will be updated with correct configuration.
You can also use a ConfigurationListener and postone publishing your service (not ManagedService) till configuration that you are looking for is available.
On Tue, Nov 2, 2010 at 2:56 PM, Peter Lauri <peter.lauri@xxxxxx>
I have a bundle that is providing a service that needs to be configured before it starts. As I have understood it there are two approaches, one is to use the ManagedService and one is to use the ConfigurationAdmin. However, how do this map to Virgo? If I put a properties file to "pickup" that will be deployed as a configuration artifact. Should that map directly to the ManagedService.update() call?
Hashtable<String, String> prop = new Hashtable<String, String>();
this.managedServiceRegistration = bundleContext.registerService(ManagedService.class.getName(), this, prop);
virgo-dev mailing list