[jira] [Commented] (DELTASPIKE-1277) Force refresh of cached config values

2017-07-10 Thread Romain Manni-Bucau (JIRA)

[ 
https://issues.apache.org/jira/browse/DELTASPIKE-1277?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16080333#comment-16080333
 ] 

Romain Manni-Bucau commented on DELTASPIKE-1277:


Hi Alexander,

yes this map would be a good entry point. We can't use a cdi bean yet because 
1. it must work in extensions themself so no bean yet, 2. there are some 
workarounds for ears and some containers so even if less elegant the map is 
more reliable for now. The type resolvers always being contextual you should be 
able to use this map to get the "current" tracker/storage. ConfigResolver has 
the role of storage today, I'm not sure it fully fit the perf requirements 
since you can get a slow config source but adding a light cache with eviction 
on top of it would be easy. In term of internal refactoring it would just 
require to store a ConfigContext per classloader instead of just 
sources/converters etc to be able to add more contextual data to it IMO. I'm 
sure there are other solution but I don't see any blocker to do it.

wdyt?



> Force refresh of cached config values
> -
>
> Key: DELTASPIKE-1277
> URL: https://issues.apache.org/jira/browse/DELTASPIKE-1277
> Project: DeltaSpike
>  Issue Type: Improvement
>  Components: Configuration
>Reporter: Alexander Falb
> Attachments: forcerefresh.patch
>
>
> When using a {{TypedResolver}} or {{UntypedResolver}} with caching enabled, 
> there is no way of bypassing the cache and forcefully reloading the value 
> from underlying datasources.
> The attached patch is a proposal of creating such an mechanism. It introduces 
> a {{void forceRefresh()}} method to the {{TypedResolver}}, implements this 
> method by resetting the {{reloadAfter}} field and adds a unit test.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (DELTASPIKE-1277) Force refresh of cached config values

2017-07-10 Thread Alexander Falb (JIRA)

[ 
https://issues.apache.org/jira/browse/DELTASPIKE-1277?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16080324#comment-16080324
 ] 

Alexander Falb commented on DELTASPIKE-1277:


Hi Romain,

I'm not sure about which storage by application you are talking about. The 
{{Map configSources}}?

Having a service (Bean or just some static methods) to retrieve all 
PropertyBuilders created by the application would be the goal. Ofc an iterator 
of them would provide even more options than a simple {{getByKey}}, like the 
proposed {{refreshValue("key")}}. But I'm still not sure where to collect all 
the created PropertyBuilders.

Alex

> Force refresh of cached config values
> -
>
> Key: DELTASPIKE-1277
> URL: https://issues.apache.org/jira/browse/DELTASPIKE-1277
> Project: DeltaSpike
>  Issue Type: Improvement
>  Components: Configuration
>Reporter: Alexander Falb
> Attachments: forcerefresh.patch
>
>
> When using a {{TypedResolver}} or {{UntypedResolver}} with caching enabled, 
> there is no way of bypassing the cache and forcefully reloading the value 
> from underlying datasources.
> The attached patch is a proposal of creating such an mechanism. It introduces 
> a {{void forceRefresh()}} method to the {{TypedResolver}}, implements this 
> method by resetting the {{reloadAfter}} field and adds a unit test.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)