felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Watson (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FELIX-5356) Component Factory and CM factory Configurations behave badly
Date Thu, 22 Sep 2016 12:55:20 GMT

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

Thomas Watson commented on FELIX-5356:

Yes, that is the approach I was going to use.  Basically just ignore factory configurations
for factory components, otherwise the rest of the code/behavior with respect to singleton
configuration stays the same.

> 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
> {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
> 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
> 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

View raw message