Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[equinox-dev] Is there a "bug" in the DS specification?

In section 117.2 of the specification it says (I paraphrase):
 
A.  If there is no Configuration with a PID or FactoryPID then the component is deployed with properties from the xml file
B.  If there is a Configuration with a PID with the same name as the component then the properties are overridden with the properties from the Configuration
 
C.  (This one I am copying directly from the specification)
 
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.
 
What I don't understand is how to have a "factoryPID" configuration with zero Configurations.  In order to create a ManagedFactory cofiguration one must use ConfigurationAdmin.createFactoryConfiguration("component-name") which will then create a configuration with a factoryPID and a generated PID.  This is a Configuration with a factoryPID, but there is one of them.  Not zero.  Which is unfortunate, because I actually want the situation where the components are created due to dynamic additions and subtractions from factory Configuration objects (Configuration objects with the factoryPID set).
 
However, it is impossible for DS to determine the difference between two cases then.
 
1.  There is no Configuration object but I want a component to be created with the properties from the XML file
2.  There is no Configuration object but I wanted to create a Configuration with a matching FactoryPID later.
 
Since there is no way to tell the component which of the two situations I wanted, it seems like there is a problem.  There seems to only be two ways to fix this:
 
1.  Somehow change the ConfigurationAdmin specification to allow for a Factory Configuration with zero subordinate configurations (doesn't seem possible, given the mechanichs of the ConfigurationAdmin specification).
2.  Some sort of property on the component that tells it that it should be tied to the FactoryPID of a Configuration.  (Obviously "factory" is out.  Perhaps something like "deployment-policy").
 
Am I misreading the specification?  Is there some other way to read this section?  Can you DS experts help me out here?  (What I actually want is behavior #2 up above - components that are tied to a Factory Configuration and which are created and destroyed dynamically).
 
John Wells (Aziz)
 
(From my yahoo account, since I am on "vacation" reading specifications!!!)


Yahoo! Shopping
Find Great Deals on Holiday Gifts at Yahoo! Shopping

Back to the top