Hi all,

I have a question relating to factory configurations and Section 112.7,
Deployment, of the R4.2 Draft Compendium Specification (dated 2009/03/10).

In this section there is a list of how components can be configured,
among which there is:

   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.

Now, if there is at least one Configuration in Confguration Admin, whose
service.factoryPid equals the component name, I have no issues
understanding this.

But how can I tell the difference between (1) "no Configuration with
service.factoryPid equal to the component name" and (2) "no
Configuration with service.pid equal to the component name" ?

Is this distinction important at all ?

Consider a component X with "configuration-policy=optional" and no
Configuration with service.pid or service.factoryPid set to the
component name.

Here SCR has to activate the component (provided it is satisifed). This
could be the "Factory Configuration" case with a factory with zero
configurations [(1) above] or the "No Configuration" case [(2) above].

The difference is, that in the "factory configurtion" case the component
must not be activated. In the "no configuration" case the component must
be activated (provided the service references are satisfied).

Now, consider a configuration is created whose service.factoryPid is set
to the name of component X. This clearly puts component X into the
"factory configuration" case.

  * If X has already been treated as in the "factory configuration"
      case, there is no problem: Just create a component configuration
      as defined

  * If X has been treated as in the "no configuration" case, there is
      a potential problem: should the component configuration be
      recreated ? What if the component has been declared with a
      modified method ?

Otherwise, consider a configuration is not created assuming the "factory
configuration" case with a factory without configurations: This might be
not what has been intended by the component provider...

My stand would be to consider the case of no configuration to be in the
"no configuration" case by default. If a configuration would be created
with service.factoryPid set to the component name, I would turn the
component over into a "factory configuration" case setup.

Can you help me out of this dilemma ? Thanks.

Regards
Felix


_______________________________________________
OSGi Developer Mail List
[email protected]
https://mail.osgi.org/mailman/listinfo/osgi-dev

Reply via email to