Hi,

I have another thought based on the configadmin spec. if you have still
some energy to read my mails :)

In *104.3.2 Targeted Pid*s

The target PID scopes the applicability of the PID to a limited set of
> target bundles.
> The syntax of a target pid is: target-pid ::= PID ( '|' symbolic-name (
> '|' version ( '|' location )? )? )?


My question is: Why do we target the bundle?

Using Require-Bundle at bundle wirings is "deprecated" and there is a
reason for that.

Before reading the following, please note: I am not proposing to change the
syntax of PIDs in an incompatible way. I am writing these examples simply
to have a similarity with the current spec.

Why do not we target with OSGi filters?

An example to target a bundle:

MYPID|(bundle.symbolicName=myBundle)

Well, targeting bundles are not that interesting. I would never use that.
But targeting components or managed services that have multiple versions in
the OSGi container can be much more interesting. The selected Managed
Service would be based on its service properties.

If one uses ConfigurationListener instead of ManagedService to implement a
component framework, he/she can decide what the OSGi filter should be
matched against.

An example to be sure that the compatible version of the component will
pick up the configuration :

MYPID|(&(version>=2.1)!(version>=3))

Kind regards,
*Balázs*
_______________________________________________
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev

Reply via email to