felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alex Soto (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FELIX-5549) Factory component fails to reactivate after config changes
Date Fri, 24 Feb 2017 15:42:44 GMT

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

Alex Soto commented on FELIX-5549:

I am sorry that I was confused about _org.osgi.service.component.ComponentFactory_ and the
actual factory component being deactivated.  What I was expecting is that, (upon a change
in the configuration),  _org.osgi.service.component.ComponentFactory_ would get deactivated
and reactivated, and that Booter would get notified about it.   What is actually happening
is that _org.osgi.service.component.ComponentFactory_ is a service, not a component, and it
is not affected by the change in the configuration.  I understand now this is not a bug, but
how it is designed.

bq. Out of curiosity I'd like to know what circumstances you have that lead you to try using
a factory component rather than a normal component with a factory configuration

What I am trying to do is to be able create a pool of components to collaborate in performing
a task.   The Booter is responsible to create a number of instances dynamically based on load
and/or other criteria.  

Right now, my problem is that there is no way for Booter to know when a WorkerImpl instance
is deactivated due to change in configuration, or due to a system shutdown.  If due to a change
in configuration, I want to recreate the instances, but again, I don't know how to determine
the cause for the deactivation.

> Factory component fails to reactivate after config changes
> ----------------------------------------------------------
>                 Key: FELIX-5549
>                 URL: https://issues.apache.org/jira/browse/FELIX-5549
>             Project: Felix
>          Issue Type: Bug
>          Components: Declarative Services (SCR)
>         Environment: Karaf 4.0.8
>            Reporter: Alex Soto
> A factory component fails to reactive after the configuration changes.  Initially, the
component initializes normally.  After it is in Active state, the configuration referenced
by the component _configurationPid_  changes, which causes the component to not activate again.
> A minimal application demonstrating this behavior is available here:
> https://github.com/lexsoto/blueprint-ds-config-reload

This message was sent by Atlassian JIRA

View raw message