Thomas Watson created FELIX-5356:

             Summary: Component Factory and CM factory Configurations behave 
                 Key: FELIX-5356
             Project: Felix
          Issue Type: Bug
          Components: Declarative Services (SCR)
    Affects Versions: scr-2.0.6
         Environment: All
            Reporter: Thomas Watson
            Priority: Minor

This is a corner case and a minor issue in my opinion.  The specification 
really only mentions the following with respect to what should happen with 
factory components and CM factory configurations:

A factory configuration must not be used if the component is a factory 
component. This is because SCR is not free to create component configurations 
as necessary to support multiple Configurations. When SCR detects this 
condition, it must log an error message with the Log Service,
if present, and ignore the component description.

At face value it seems to suggest that any CM factory configurations must be 
ignored when they match the factory component PID.  But the last sentence also 
makes a strong assertion that the component description must be ignored if 
matching factory configurations are detected while discovering a factory 
component description.  This seems overkill to me.  Why not just ignore the 
factory configurations?  Why must the factory component description be ignored 

The other issue is that if a matching factory configuration is created later, 
after a ComponentFactory has been registered and a ComponentInstance has been 
created (with newInstance) then felix SCR will dispose of the 
ComponentInstance.  In this case the component instance did not specify an 
update method.

This message was sent by Atlassian JIRA

Reply via email to