You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Felix Meschberger (JIRA)" <ji...@apache.org> on 2012/07/02 15:31:21 UTC
[jira] [Created] (FELIX-3577) Refacter helpers and service trackers
Felix Meschberger created FELIX-3577:
----------------------------------------
Summary: Refacter helpers and service trackers
Key: FELIX-3577
URL: https://issues.apache.org/jira/browse/FELIX-3577
Project: Felix
Issue Type: Improvement
Components: Configuration Admin
Affects Versions: configadmin-1.4.0
Reporter: Felix Meschberger
Assignee: Felix Meschberger
Fix For: configadmin-1.6.0
The ConfigurationManager class currently hosts quite a number of inner classes to help with its tasks. A few of these classes have overlapping functionality which makes it hard to easily implement targeted PIDs these functionalities should be better aligned:
* ManagedService[Factory]Tracker don't really get the services but maintain a map of PIDs and assigned
configurations (most importantly the targeted PID and configuration modification counter)
* ManagedService[Factory] callbacks are also executed by the tracker classes
* The ManagedService[Factory]Helper classes are renamed to [Factory]ConfigurationHelper since
they are helpers to convey configuration to ManagedService[Factory] services through the respective
trackers.
* The ServiceHolder class is replaced by the ConfigurationMap class managed by the trackers.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (FELIX-3577) Refactor helpers and service
trackers
Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FELIX-3577?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13407062#comment-13407062 ]
Felix Meschberger commented on FELIX-3577:
------------------------------------------
Rev. 1357578: Move the configuration selection for the MSFUpdate tasks from the constructor to the run method. This now serializes configuration selections for known services and service selections for known configurations in the Configuration Update thread
> Refactor helpers and service trackers
> -------------------------------------
>
> Key: FELIX-3577
> URL: https://issues.apache.org/jira/browse/FELIX-3577
> Project: Felix
> Issue Type: Improvement
> Components: Configuration Admin
> Affects Versions: configadmin-1.4.0
> Reporter: Felix Meschberger
> Assignee: Felix Meschberger
> Fix For: configadmin-1.6.0
>
>
> The ConfigurationManager class currently hosts quite a number of inner classes to help with its tasks. A few of these classes have overlapping functionality which makes it hard to easily implement targeted PIDs these functionalities should be better aligned:
> * ManagedService[Factory]Tracker don't really get the services but maintain a map of PIDs and assigned
> configurations (most importantly the targeted PID and configuration modification counter)
> * ManagedService[Factory] callbacks are also executed by the tracker classes
> * The ManagedService[Factory]Helper classes are renamed to [Factory]ConfigurationHelper since
> they are helpers to convey configuration to ManagedService[Factory] services through the respective
> trackers.
> * The ServiceHolder class is replaced by the ConfigurationMap class managed by the trackers.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (FELIX-3577) Refactor helpers and service
trackers
Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FELIX-3577?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13405073#comment-13405073 ]
Felix Meschberger commented on FELIX-3577:
------------------------------------------
Added a few first helper classes in Rev. 1356232:
- ManagedService[Factory]Tracker and abstract base class
- ConfigurationMap (replacing ServiceHolder)
> Refactor helpers and service trackers
> -------------------------------------
>
> Key: FELIX-3577
> URL: https://issues.apache.org/jira/browse/FELIX-3577
> Project: Felix
> Issue Type: Improvement
> Components: Configuration Admin
> Affects Versions: configadmin-1.4.0
> Reporter: Felix Meschberger
> Assignee: Felix Meschberger
> Fix For: configadmin-1.6.0
>
>
> The ConfigurationManager class currently hosts quite a number of inner classes to help with its tasks. A few of these classes have overlapping functionality which makes it hard to easily implement targeted PIDs these functionalities should be better aligned:
> * ManagedService[Factory]Tracker don't really get the services but maintain a map of PIDs and assigned
> configurations (most importantly the targeted PID and configuration modification counter)
> * ManagedService[Factory] callbacks are also executed by the tracker classes
> * The ManagedService[Factory]Helper classes are renamed to [Factory]ConfigurationHelper since
> they are helpers to convey configuration to ManagedService[Factory] services through the respective
> trackers.
> * The ServiceHolder class is replaced by the ConfigurationMap class managed by the trackers.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (FELIX-3577) Refactor helpers and service
trackers
Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FELIX-3577?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13407042#comment-13407042 ]
Felix Meschberger commented on FELIX-3577:
------------------------------------------
The last change introduced a race condition between service registration (particularly ManagedServiceFactory) and concurrent configuration update (example uses ManagedServiceFactory):
T2: creates/updates configuration
- create factory config
- update factory config
- store config
- update internal factory map
- T2 preempted
T1: register service
- ServiceTracker calls addingService
- gets the service PIDs
- for each PID:
- find config
- check config (ignoring new configs)
- schedule update
- T1 preempted
T2: picks up again to continue persisting the configuration
- internally set config non-new
- schedule update
The configuration update (on the ConfigurationUpdateThread) in T2 may not find a registered service because addingService in T1 has not completed yet and thus the service is not yet officially known by the ServiceTracker, which in turn is used by the ConfigurationUpdate to look for targets to configure.
The configuration update due to T1 fails because the ManagedServiceFactoryUpdate constructor may find a configuration but ignores it because it is still new (Configuration.update(Dictionary) in T2 has not yet completed its work). On the ConfigurationUpdateThread the ManagedServiceFactoryUpdate does nothing because there is no valid configuration to provide.
> Refactor helpers and service trackers
> -------------------------------------
>
> Key: FELIX-3577
> URL: https://issues.apache.org/jira/browse/FELIX-3577
> Project: Felix
> Issue Type: Improvement
> Components: Configuration Admin
> Affects Versions: configadmin-1.4.0
> Reporter: Felix Meschberger
> Assignee: Felix Meschberger
> Fix For: configadmin-1.6.0
>
>
> The ConfigurationManager class currently hosts quite a number of inner classes to help with its tasks. A few of these classes have overlapping functionality which makes it hard to easily implement targeted PIDs these functionalities should be better aligned:
> * ManagedService[Factory]Tracker don't really get the services but maintain a map of PIDs and assigned
> configurations (most importantly the targeted PID and configuration modification counter)
> * ManagedService[Factory] callbacks are also executed by the tracker classes
> * The ManagedService[Factory]Helper classes are renamed to [Factory]ConfigurationHelper since
> they are helpers to convey configuration to ManagedService[Factory] services through the respective
> trackers.
> * The ServiceHolder class is replaced by the ConfigurationMap class managed by the trackers.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (FELIX-3577) Refactor helpers and service
trackers
Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FELIX-3577?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13405687#comment-13405687 ]
Felix Meschberger commented on FELIX-3577:
------------------------------------------
Rev. 1356293 Fix a conversion glitch (calling service reference removal instead of configuration removal). Also renamed the provide and remove methods to provideConfiguration and removeConfiguration to make the distinction of removal clear.
> Refactor helpers and service trackers
> -------------------------------------
>
> Key: FELIX-3577
> URL: https://issues.apache.org/jira/browse/FELIX-3577
> Project: Felix
> Issue Type: Improvement
> Components: Configuration Admin
> Affects Versions: configadmin-1.4.0
> Reporter: Felix Meschberger
> Assignee: Felix Meschberger
> Fix For: configadmin-1.6.0
>
>
> The ConfigurationManager class currently hosts quite a number of inner classes to help with its tasks. A few of these classes have overlapping functionality which makes it hard to easily implement targeted PIDs these functionalities should be better aligned:
> * ManagedService[Factory]Tracker don't really get the services but maintain a map of PIDs and assigned
> configurations (most importantly the targeted PID and configuration modification counter)
> * ManagedService[Factory] callbacks are also executed by the tracker classes
> * The ManagedService[Factory]Helper classes are renamed to [Factory]ConfigurationHelper since
> they are helpers to convey configuration to ManagedService[Factory] services through the respective
> trackers.
> * The ServiceHolder class is replaced by the ConfigurationMap class managed by the trackers.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Closed] (FELIX-3577) Refactor helpers and service trackers
Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FELIX-3577?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Felix Meschberger closed FELIX-3577.
------------------------------------
> Refactor helpers and service trackers
> -------------------------------------
>
> Key: FELIX-3577
> URL: https://issues.apache.org/jira/browse/FELIX-3577
> Project: Felix
> Issue Type: Improvement
> Components: Configuration Admin
> Affects Versions: configadmin-1.4.0
> Reporter: Felix Meschberger
> Assignee: Felix Meschberger
> Fix For: configadmin-1.6.0
>
>
> The ConfigurationManager class currently hosts quite a number of inner classes to help with its tasks. A few of these classes have overlapping functionality which makes it hard to easily implement targeted PIDs these functionalities should be better aligned:
> * ManagedService[Factory]Tracker don't really get the services but maintain a map of PIDs and assigned
> configurations (most importantly the targeted PID and configuration modification counter)
> * ManagedService[Factory] callbacks are also executed by the tracker classes
> * The ManagedService[Factory]Helper classes are renamed to [Factory]ConfigurationHelper since
> they are helpers to convey configuration to ManagedService[Factory] services through the respective
> trackers.
> * The ServiceHolder class is replaced by the ConfigurationMap class managed by the trackers.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (FELIX-3577) Refactor helpers and service
trackers
Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FELIX-3577?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13405089#comment-13405089 ]
Felix Meschberger commented on FELIX-3577:
------------------------------------------
In Rev. 1356236 adapt to new helper classes and add dependency to OSGi Core 5.0 (to have support for generics). In turn we limit the Framework API import to 1.4 (aka R4.1) to still be able to support older framework releases (the integration tests run with Felix Framework 1.8.0). This also allows me to remove the copy of the generified OSGi ServiceReference class.
> Refactor helpers and service trackers
> -------------------------------------
>
> Key: FELIX-3577
> URL: https://issues.apache.org/jira/browse/FELIX-3577
> Project: Felix
> Issue Type: Improvement
> Components: Configuration Admin
> Affects Versions: configadmin-1.4.0
> Reporter: Felix Meschberger
> Assignee: Felix Meschberger
> Fix For: configadmin-1.6.0
>
>
> The ConfigurationManager class currently hosts quite a number of inner classes to help with its tasks. A few of these classes have overlapping functionality which makes it hard to easily implement targeted PIDs these functionalities should be better aligned:
> * ManagedService[Factory]Tracker don't really get the services but maintain a map of PIDs and assigned
> configurations (most importantly the targeted PID and configuration modification counter)
> * ManagedService[Factory] callbacks are also executed by the tracker classes
> * The ManagedService[Factory]Helper classes are renamed to [Factory]ConfigurationHelper since
> they are helpers to convey configuration to ManagedService[Factory] services through the respective
> trackers.
> * The ServiceHolder class is replaced by the ConfigurationMap class managed by the trackers.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (FELIX-3577) Refactor helpers and service
trackers
Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FELIX-3577?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13406468#comment-13406468 ]
Felix Meschberger commented on FELIX-3577:
------------------------------------------
Canalize all ManagedService[Factory] updates through the BaseTracker.*Configuration methods in Rev. 1356645
- move error handling to BaseTracker
- improve service selection in BaseTracker.getServices for targeted PIDs
- expose raw PID from TargetedPID
> Refactor helpers and service trackers
> -------------------------------------
>
> Key: FELIX-3577
> URL: https://issues.apache.org/jira/browse/FELIX-3577
> Project: Felix
> Issue Type: Improvement
> Components: Configuration Admin
> Affects Versions: configadmin-1.4.0
> Reporter: Felix Meschberger
> Assignee: Felix Meschberger
> Fix For: configadmin-1.6.0
>
>
> The ConfigurationManager class currently hosts quite a number of inner classes to help with its tasks. A few of these classes have overlapping functionality which makes it hard to easily implement targeted PIDs these functionalities should be better aligned:
> * ManagedService[Factory]Tracker don't really get the services but maintain a map of PIDs and assigned
> configurations (most importantly the targeted PID and configuration modification counter)
> * ManagedService[Factory] callbacks are also executed by the tracker classes
> * The ManagedService[Factory]Helper classes are renamed to [Factory]ConfigurationHelper since
> they are helpers to convey configuration to ManagedService[Factory] services through the respective
> trackers.
> * The ServiceHolder class is replaced by the ConfigurationMap class managed by the trackers.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (FELIX-3577) Refactor helpers and service
trackers
Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FELIX-3577?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Felix Meschberger resolved FELIX-3577.
--------------------------------------
Resolution: Fixed
Everything works now, so this refactoring issue can now be resolved
> Refactor helpers and service trackers
> -------------------------------------
>
> Key: FELIX-3577
> URL: https://issues.apache.org/jira/browse/FELIX-3577
> Project: Felix
> Issue Type: Improvement
> Components: Configuration Admin
> Affects Versions: configadmin-1.4.0
> Reporter: Felix Meschberger
> Assignee: Felix Meschberger
> Fix For: configadmin-1.6.0
>
>
> The ConfigurationManager class currently hosts quite a number of inner classes to help with its tasks. A few of these classes have overlapping functionality which makes it hard to easily implement targeted PIDs these functionalities should be better aligned:
> * ManagedService[Factory]Tracker don't really get the services but maintain a map of PIDs and assigned
> configurations (most importantly the targeted PID and configuration modification counter)
> * ManagedService[Factory] callbacks are also executed by the tracker classes
> * The ManagedService[Factory]Helper classes are renamed to [Factory]ConfigurationHelper since
> they are helpers to convey configuration to ManagedService[Factory] services through the respective
> trackers.
> * The ServiceHolder class is replaced by the ConfigurationMap class managed by the trackers.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (FELIX-3577) Refactor helpers and service trackers
Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FELIX-3577?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Felix Meschberger updated FELIX-3577:
-------------------------------------
Summary: Refactor helpers and service trackers (was: Refacter helpers and service trackers)
> Refactor helpers and service trackers
> -------------------------------------
>
> Key: FELIX-3577
> URL: https://issues.apache.org/jira/browse/FELIX-3577
> Project: Felix
> Issue Type: Improvement
> Components: Configuration Admin
> Affects Versions: configadmin-1.4.0
> Reporter: Felix Meschberger
> Assignee: Felix Meschberger
> Fix For: configadmin-1.6.0
>
>
> The ConfigurationManager class currently hosts quite a number of inner classes to help with its tasks. A few of these classes have overlapping functionality which makes it hard to easily implement targeted PIDs these functionalities should be better aligned:
> * ManagedService[Factory]Tracker don't really get the services but maintain a map of PIDs and assigned
> configurations (most importantly the targeted PID and configuration modification counter)
> * ManagedService[Factory] callbacks are also executed by the tracker classes
> * The ManagedService[Factory]Helper classes are renamed to [Factory]ConfigurationHelper since
> they are helpers to convey configuration to ManagedService[Factory] services through the respective
> trackers.
> * The ServiceHolder class is replaced by the ConfigurationMap class managed by the trackers.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira