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!!!)