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

Kamil commented on CAMEL-13425:
-------------------------------

[~davsclaus] I know, let it be the first step.

Currently I do:
{code:java}
@Modified
public void modified(final MyConfiguration configuration) throws Exception {
  this.configuration = configuration;
  final CamelContext context = getContext();
  context.removeRoute(ID_ROUTE);
  context.addRoutes(this);
}
{code}
to overcome this, but this is pain:
{code:java}
@Activate public MyServiceImpl(@Reference final CamelContext camelContext, 
final MyConfiguration configuration) throws Exception { 
  super(camelContext); 
  this.configuration = configuration; 
  propertiesComponent = getContext().getComponent("properties", 
PropertiesComponent.class); 
  propertiesComponent.setCache(false); //<- :(
  getContext().addRoutes(this); 
}
{code}

> Add possibility to invalidate cache for PropertiesComponent
> -----------------------------------------------------------
>
>                 Key: CAMEL-13425
>                 URL: https://issues.apache.org/jira/browse/CAMEL-13425
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 2.23.1
>            Reporter: Kamil
>            Priority: Major
>
> Currently I can only enable/disable cache for PropertiesComponent.
> I'd like to be able to enable caching, but programmatically invalidate cache 
> on demand.
> This should be rather simeple to implemet, something like:
> {code:java}
> public void invalidateCache() {
>   this.cacheMap.clear();
> }
> {code}



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

Reply via email to