[jira] [Commented] (FELIX-6103) ConfigInstaller, when using NotCachablePersistenceManager, can restore cached stale properties

2020-07-15 Thread Jira


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

Jean-Baptiste Onofré commented on FELIX-6103:
-

Agree, the "fix" is wrong IMHO. We should use {{getConfiguration(pid, null)}}. 
I'm reopening the Jira and do the fix.

> ConfigInstaller, when using NotCachablePersistenceManager, can restore cached 
> stale properties
> --
>
> Key: FELIX-6103
> URL: https://issues.apache.org/jira/browse/FELIX-6103
> Project: Felix
>  Issue Type: Bug
>  Components: File Install
>Reporter: Mariano Alvaro
>Assignee: Raymond Augé
>Priority: Major
> Fix For: fileinstall-3.6.6
>
> Attachments: diffs.txt
>
>
> When using a NotCachablePersistenceManager the following steps occur when 
> changing .config file values:
>  
>  # ConfigInstaller.setConfig gets called.
>  # Configuration gets retrieved from ConfigInstaller.getConfiguration method
>  # getConfigurationAdmin().listConfigurations(filter) returns a new 
> configuration each time because NotCacheablePersitenceManger is used.
>  # Changes are performed in the new Configuration.
>  # ConfigInstaller.doConfigurationEvent gets called back and retrieves 
> configuration from configurationAdmin.
>  # ConfigurationAdmin.getConfiguration retrieves cached value (hasn't been 
> updated in step 4 because a new differente configuration was returned)
>  # config file gets updated with cached values



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (FELIX-6103) ConfigInstaller, when using NotCachablePersistenceManager, can restore cached stale properties

2020-07-15 Thread Guillaume Nodet (Jira)


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

Guillaume Nodet commented on FELIX-6103:


Yes, the 1-arg {{getConfiguration(pid)}} method call should only be used from 
the bundle which is using the configuration directly.  Any other usage, such as 
the one here, should use either {{getConfiguration(pid, "?")}} or 
{{getConfiguration(pid, null)}}.

> ConfigInstaller, when using NotCachablePersistenceManager, can restore cached 
> stale properties
> --
>
> Key: FELIX-6103
> URL: https://issues.apache.org/jira/browse/FELIX-6103
> Project: Felix
>  Issue Type: Bug
>  Components: File Install
>Reporter: Mariano Alvaro
>Assignee: Raymond Augé
>Priority: Major
> Fix For: fileinstall-3.6.6
>
> Attachments: diffs.txt
>
>
> When using a NotCachablePersistenceManager the following steps occur when 
> changing .config file values:
>  
>  # ConfigInstaller.setConfig gets called.
>  # Configuration gets retrieved from ConfigInstaller.getConfiguration method
>  # getConfigurationAdmin().listConfigurations(filter) returns a new 
> configuration each time because NotCacheablePersitenceManger is used.
>  # Changes are performed in the new Configuration.
>  # ConfigInstaller.doConfigurationEvent gets called back and retrieves 
> configuration from configurationAdmin.
>  # ConfigurationAdmin.getConfiguration retrieves cached value (hasn't been 
> updated in step 4 because a new differente configuration was returned)
>  # config file gets updated with cached values



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (FELIX-6103) ConfigInstaller, when using NotCachablePersistenceManager, can restore cached stale properties

2020-07-15 Thread Grzegorz Grzybek (Jira)


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

Grzegorz Grzybek commented on FELIX-6103:
-

Yes, with fileinstall 3.6.4 and Karaf 4.2.8, pax-web karaf itests work fine.

> ConfigInstaller, when using NotCachablePersistenceManager, can restore cached 
> stale properties
> --
>
> Key: FELIX-6103
> URL: https://issues.apache.org/jira/browse/FELIX-6103
> Project: Felix
>  Issue Type: Bug
>  Components: File Install
>Reporter: Mariano Alvaro
>Assignee: Raymond Augé
>Priority: Major
> Fix For: fileinstall-3.6.6
>
> Attachments: diffs.txt
>
>
> When using a NotCachablePersistenceManager the following steps occur when 
> changing .config file values:
>  
>  # ConfigInstaller.setConfig gets called.
>  # Configuration gets retrieved from ConfigInstaller.getConfiguration method
>  # getConfigurationAdmin().listConfigurations(filter) returns a new 
> configuration each time because NotCacheablePersitenceManger is used.
>  # Changes are performed in the new Configuration.
>  # ConfigInstaller.doConfigurationEvent gets called back and retrieves 
> configuration from configurationAdmin.
>  # ConfigurationAdmin.getConfiguration retrieves cached value (hasn't been 
> updated in step 4 because a new differente configuration was returned)
>  # config file gets updated with cached values



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (FELIX-6103) ConfigInstaller, when using NotCachablePersistenceManager, can restore cached stale properties

2020-07-15 Thread Grzegorz Grzybek (Jira)


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

Grzegorz Grzybek commented on FELIX-6103:
-

I wanted to run pax-web 7.3.8-SNAPSHOT tests with Karaf 4.2.9 which uses 
felix.fileinstall 3.6.6 and the tests failed. I checked that the problem is 
[this 
commit|https://github.com/apache/felix-dev/commit/e4131ea442a711d5996ae514dcdbfb6a6ccd0486]
 and in particular, this fragment:
{code:java}
Configuration cachedConfiguration = oldConfiguration != null ?

getConfigurationAdmin().getConfiguration(oldConfiguration.getPid()) : null;
{code}

{{configAdmin.getConfiguration(pid)}} - the 1-arg version of 
{{getConfiguration()}} always calls 
{{org.apache.felix.cm.impl.ConfigurationImpl#setDynamicBundleLocation()}} when 
location is not set and in my particular test the PIDs created by Karaf 
features installed during pax-exam tests have location set to URI of 
felix.fileinstall bundle (instead of {{"?"}}) - such configuration can't be 
passed to pax-web-runtime bundle which sets up ManagedService for 
{{org.ops4j.pax.web}} PID...

IMO, {{getConfiguration(pid, "?")}} should be called in the above fragment 
instead.

[~jbonofre], [~gnodet] what do you think?

> ConfigInstaller, when using NotCachablePersistenceManager, can restore cached 
> stale properties
> --
>
> Key: FELIX-6103
> URL: https://issues.apache.org/jira/browse/FELIX-6103
> Project: Felix
>  Issue Type: Bug
>  Components: File Install
>Reporter: Mariano Alvaro
>Assignee: Raymond Augé
>Priority: Major
> Fix For: fileinstall-3.6.6
>
> Attachments: diffs.txt
>
>
> When using a NotCachablePersistenceManager the following steps occur when 
> changing .config file values:
>  
>  # ConfigInstaller.setConfig gets called.
>  # Configuration gets retrieved from ConfigInstaller.getConfiguration method
>  # getConfigurationAdmin().listConfigurations(filter) returns a new 
> configuration each time because NotCacheablePersitenceManger is used.
>  # Changes are performed in the new Configuration.
>  # ConfigInstaller.doConfigurationEvent gets called back and retrieves 
> configuration from configurationAdmin.
>  # ConfigurationAdmin.getConfiguration retrieves cached value (hasn't been 
> updated in step 4 because a new differente configuration was returned)
>  # config file gets updated with cached values



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (FELIX-6103) ConfigInstaller, when using NotCachablePersistenceManager, can restore cached stale properties

2019-04-16 Thread Mariano Alvaro (JIRA)


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

Mariano Alvaro commented on FELIX-6103:
---

Possible solution attached: [^diffs.txt]

> ConfigInstaller, when using NotCachablePersistenceManager, can restore cached 
> stale properties
> --
>
> Key: FELIX-6103
> URL: https://issues.apache.org/jira/browse/FELIX-6103
> Project: Felix
>  Issue Type: Bug
>Reporter: Mariano Alvaro
>Priority: Major
> Attachments: diffs.txt
>
>
> When using a NotCachablePersistenceManager the following steps occur when 
> changing .config file values:
>  
>  # ConfigInstaller.setConfig gets called.
>  # Configuration gets retrieved from ConfigInstaller.getConfiguration method
>  # getConfigurationAdmin().listConfigurations(filter) returns a new 
> configuration each time because NotCacheablePersitenceManger is used.
>  # Changes are performed in the new Configuration.
>  # ConfigInstaller.doConfigurationEvent gets called back and retrieves 
> configuration from configurationAdmin.
>  # ConfigurationAdmin.getConfiguration retrieves cached value (hasn't been 
> updated in step 4 because a new differente configuration was returned)
>  # config file gets updated with cached values



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)