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 2009/08/19 08:08:14 UTC
[jira] Issue Comment Edited: (FELIX-1488) Configuration binding is
broken
[ https://issues.apache.org/jira/browse/FELIX-1488?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12744909#action_12744909 ]
Felix Meschberger edited comment on FELIX-1488 at 8/18/09 11:08 PM:
--------------------------------------------------------------------
One further case remains to be discussed and implemented:
1. create config with pid and locationA
2. update config with properties
3. register ManagedService ms1 with pid from said locationA
==> configuration supplied to the service ms1
4. register ManagedService ms2 with pid from locationB
==> configuration not supplied to service ms2
4. Call Configuration.setBundleLocation( "locationB" )
A slight variation of this use case exhibits the same problem:
1. create config with pid with null location
2. update config with properties
3. register ManagedService ms1 with pid from locationA
==> configuration supplied to the service ms1
==> configuration is dynamically bound to locationA
4. register ManagedService ms2 with pid from locationB
==> configuration not supplied to service ms2
5. Call Configuration.setBundleLocation( "locationB" )
It is unclear from the spec, what should happen after setting the new (static) bundle location. Ikuo Yamasaki proposes two options:
Option A: nothing happens
Option B: configuration is removed from ms1 and supplied to ms2
Option A is currently implemented (as of Rev. 805668), while I agree with Ikuo that Option B probably makes more sense.
I start implementing Option B.
was (Author: fmeschbe):
One further case remains to be discussed and implemented:
1. create config with pid and locationA
2. update config with properties
3. register ManagedService ms1 with pid from said locationA
==> configuration supplied to the service ms1
4. register ManagedService ms2 with pid from locationB
==> configuration not supplied to service ms2
4. Call Configuration.setBundleLocation( "locationB" )
It is unclear from the spec, what should happen next. Ikuo Yamasaki proposes two options:
Option A: nothing happens
Option B: configuration is removed from ms1 and supplied to ms2
Option A is currently implemented (as of Rev. 805668), while I agree with Ikuo that Option B probably makes more sense.
I start implementing Option B.
> Configuration binding is broken
> -------------------------------
>
> Key: FELIX-1488
> URL: https://issues.apache.org/jira/browse/FELIX-1488
> Project: Felix
> Issue Type: Bug
> Components: Configuration Admin
> Affects Versions: configadmin-1.0.10
> Reporter: Felix Meschberger
> Assignee: Felix Meschberger
> Fix For: configadmin-1.0.12
>
>
> Configuration can be statically or dynamically bound:
> * A configuration is statically bound by explicitly calling the Configuration.setBundleLocation method or
> by creating the configuration object with a non-null bundle location. Static binding must be persisted and
> is only reset by explicitly calling the setBundleLocation with a null argument.
> * A configuration may dynamically bound if the configuration has been created with a null bundle location and
> the setBundleLocation has not been called (or called with a null argument). If such an unbound configuration
> is provided to a ManagedService[Factory] it is dynamically bound to the service's bundle. Such bundle
> binding is not persisted.
> The reason why dynamic binding need not be persisted is actually an implementation detail because we keep used configurations in an internal cache. Entries in the cache are only removed if the configuration is deleted or if the configuration admin service is stopped. In the first case, bundle binding is lost anyway. In the second case dynamic bundle bindings will be recreated on configuration admin service restart when the configurations are supplied to ManagedService[Factory] services again.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.