[ 
https://issues.apache.org/jira/browse/FELIX-5356?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15511326#comment-15511326
 ] 

David Jencks commented on FELIX-5356:
-------------------------------------

I'd take your first point up with BJ.  I think it is intended to mean that 
"nothing happens" not that "kill all the instances created by newInstance".  If 
it means what it says, we gotta fix it in R7 and provide a flag for more 
sensible behavior.

For the 2nd point, I would investigate overriding getComponentMetadata() from 
AbstractComponentManager in ComponentFactoryImpl to return metadata that has 
ConfigurationPolicy.IGNORE.  Maybe this would be only if  the 
obsoleteFactoryComponent support is off (maybe it's time to drop that anyway) 
and I don't know if it would interfere with my PersistentFactoryComponent 
extension behavior.

> Component Factory and CM factory Configurations behave badly
> ------------------------------------------------------------
>
>                 Key: FELIX-5356
>                 URL: https://issues.apache.org/jira/browse/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:
> {quote}
> 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.
> {quote}
> 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 altogether?
> 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
(v6.3.4#6332)

Reply via email to