In Section 112.7 of the DS Specification, "Deployment" we find the
following paragraph:

,----
| The name of the component is used as the key for obtaining additional
| component properties from Configuration Admin. The following
| situations can arise:
| 
| o No Configuration -- If there is no Configuration with a PID or
|   factory PID equal to the component name, then component
|   configurations will not obtain component properties from
|   Configuration Admin. Only component properties specified in the
|   component description or via the ComponentFactory.newInstance method
|   will be used.
| 
| o Single Configuration -- If there exists a Configuration with a PID
|   equal to the component name, then component configurations will
|   obtain additional component properties from Configuration
|   Admin. This is the ManagedService situation.
| 
| o Factory Configuration -- If a factory PID exists, with zero or more
|   Configurations, that is equal to the component name, then for each
|   Configuration, a component configuration must be created that will
|   obtain additional component properties from Configuration
|   Admin. This is the ManagedServiceFactory situation.
`----

I'm interested in getting the "Factory Configuration" mode to work,
but by my reading here, it's not clear /when/ the given mode is
selected, as the selection is bade on which Configurations exist at
some point in time.

Is the existence of Configurations examined at the time the component
is activated? What happens if at first there is one Configuration with
a PID matching the component name, but then later several
Configurations get created against a matching factory PID? Or,
consider the situation in reverse, with a factory PID existing and
single Configuration coming along using the same PID?

I'm trying to figure out whether DS will automate the implementation
of a ManagedServiceFactory on my behalf. If so, will this automation
be sabotaged if someone or something accidentally creates a "single
Configuration" as described above? What if the factory PID-bound
Configurations get created after the component's mode has been
determined?

And if I'm not making any sense, then several days worth of
(re)reading the CM and DS specifications was clearly insufficient.

-- 
Steven E. Harris
_______________________________________________
OSGi Developer Mail List
[email protected]
http://www2.osgi.org/mailman/listinfo/osgi-dev

Reply via email to