felix-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pierre De Rop <pierre.de...@gmail.com>
Subject Re: Compendium Services managed properties and multiple bundles
Date Fri, 23 Aug 2013 07:02:16 GMT
Hi Tim,

I don't know if gemini BP is compatible with CM from OSGi compendium 4.3,
but using a 4.3 CM allows to share the same configuration PID across
multiple bundles if the configuration is created using a specific "?"
location binding (see 104.4.1 chapter, in compendium 4.3).

Technically, creating a shared configuration (using 4.3 ConfigurationAdmin)
can be done like in this example:

void configure(ConfigurationAdmin ca) {
            conf = ca.getConfiguration("org.foo.pid", "?");
}

Using the "?" location allows to make the configuration be visible by
multiple bundles.

Now, the question is: how do you configure your components ? Are you using
a custom configurator which you could modify in order to use the
multi-location binding ?


kind regards;
/Pierre


On Thu, Aug 22, 2013 at 11:01 PM, mit_jones <tim@mccarthy.co.nz> wrote:

> Hi,
>
> I am trying to use the Compendium Services managed properties as per
>
> http://www.eclipse.org/gemini/blueprint/documentation/reference/1.0.2.RELEASE/html/compendium.html
> to inject changes in configuration across multiple bundles but according to
> the spec this is not allowed:
>
> "Do not share the same persistent-id (PID) between multiple bundles or
> definitions, as only one of them will receive notifications.
> managed-properties relies on org.osgi.service.cm.ManagedService contract
> which mandates that each ManagedService instance must be identified with
> its
> own unique PID. Please see the Configuration Admin spec
> (http://www.osgi.org/download/r4-v4.2-cmpn-draft-20090310.pdf),
> specifically
> section 104.3 and 104.5"
>
> Is there a common pattern/approach to achieving this, e.g. in my case I
> have
> a property that should turn 'auditing' on or off but this property needs to
> be visible across multiple bundles.
>
> Thanks,
>
> Tim
>
>
>
> --
> View this message in context:
> http://apache-felix.18485.x6.nabble.com/Compendium-Services-managed-properties-and-multiple-bundles-tp5004675.html
> Sent from the Apache Felix - Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message