Hi,

I´m trying  to get to work a custom OSGi service with configurable
properties over Sling. My goal is using the Felix web console to admin the
OSGi service but supplying an initial configuration programatically. The
initial configuration could be retrieved from bundle context or maybe an
external file.

The service is basically defined like this:

/**
 * @scr.component label="%custom.name" description="%custom.description"
 * @scr.property name="service.description" value="Custom Service"
 * @scr.property name="service.vendor" value="The Apache Software
Foundation"
*  @scr.service
 */
public class CustomOsgiService implements ManagedService {

    /**
     * @scr.property value=""
     */
    public static final String PROP_CUSTOM = "prop.custom";

    public void activate(ComponentContext context).......

    public void deactivate(ComponentContext context).......

    public void update(Dictionary props).......

}

How could I initialize PROP_CUSTOM programatically?

How could I manage PROP_CUSTOM changes? (using Felix console SAVE button).

Is it necessary CustomService to be a managed service?.

Should I register CustomService with the Configuration Admin Service?.

Any help will be appreciate.

Thanks in advance,

BR,

Juanjo.

Reply via email to