On Tue, Jan 13, 2009 at 12:15 PM, Felix Meschberger <[email protected]> wrote:
> Juan José Vázquez Delgado schrieb:
>> ...but what happens for instance if you want the property being
>> initialized from the result of a method accesing to bundle context?...

> ...You can do that in the activator method since the BundleContext is also
> available from the ComponentContext:
>
>
>    protected void activate(ComponentContext context) {
>        BundleContext ctx = context.getBundleContext();
>        Object prop = getFromBundleContext(ctx);
>        if (prop == null) {
>           prop = getFromConfiguration(context.getProperties());
>        }
>    }...

And if you want that dynamic default value to appear in the OSGi
console, you have to update the config yourself as well, right?
Something like the jcr/jackrabbit-client Activator's
verifyConfiguration method does.

-Bertrand

Reply via email to