You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by "John Ellis (JIRA)" <ji...@apache.org> on 2010/08/25 05:30:47 UTC
[jira] Created: (CAMEL-3078) Cache Component configuration requires
MemoryStoreEvictionPolicy instance, will not accept parameter as part of
URI
Cache Component configuration requires MemoryStoreEvictionPolicy instance, will not accept parameter as part of URI
-------------------------------------------------------------------------------------------------------------------
Key: CAMEL-3078
URL: https://issues.apache.org/activemq/browse/CAMEL-3078
Project: Apache Camel
Issue Type: Bug
Affects Versions: 2.4.0
Environment: Camel core and cache component retrieved from Maven repo
Reporter: John Ellis
In Spring, if one attempts to specify a cache endpoint as:
<endpoint id="myCache" uri="cache://MyCache?memoryStoreEvictionPolicy=MemoryStoreEvictionPolicy.FIFO"/>
an exception will be thrown that the String "MemoryStoreEvictionPolicy.FIFO" was not a proper Java Object and no TypeConverter is available. This can be worked-around by manually creating a type converter that performs:
String policyName = evictionPolicy.replace("MemoryStoreEvictionPolicy.", "");
return MemoryStoreEvictionPolicy.fromString(policyName);
Or one could just try to create a new instance from reflection. Above way is a bit more manageable however, since EhCache is taking care of the conversion for you.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (CAMEL-3078) Cache Component configuration
requires MemoryStoreEvictionPolicy instance, will not accept parameter as
part of URI
Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-3078?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Claus Ibsen resolved CAMEL-3078.
--------------------------------
Assignee: Claus Ibsen
Fix Version/s: 2.5.0
Resolution: Fixed
trunk: 989045.
Thanks for reporting. You can now just assign the option the value as {{FIFO}}.
> Cache Component configuration requires MemoryStoreEvictionPolicy instance, will not accept parameter as part of URI
> -------------------------------------------------------------------------------------------------------------------
>
> Key: CAMEL-3078
> URL: https://issues.apache.org/activemq/browse/CAMEL-3078
> Project: Apache Camel
> Issue Type: Bug
> Affects Versions: 2.4.0
> Environment: Camel core and cache component retrieved from Maven repo
> Reporter: John Ellis
> Assignee: Claus Ibsen
> Fix For: 2.5.0
>
>
> In Spring, if one attempts to specify a cache endpoint as:
> <endpoint id="myCache" uri="cache://MyCache?memoryStoreEvictionPolicy=MemoryStoreEvictionPolicy.FIFO"/>
> an exception will be thrown that the String "MemoryStoreEvictionPolicy.FIFO" was not a proper Java Object and no TypeConverter is available. This can be worked-around by manually creating a type converter that performs:
> String policyName = evictionPolicy.replace("MemoryStoreEvictionPolicy.", "");
> return MemoryStoreEvictionPolicy.fromString(policyName);
> Or one could just try to create a new instance from reflection. Above way is a bit more manageable however, since EhCache is taking care of the conversion for you.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.