[
https://issues.jboss.org/browse/WFLY-9519?page=com.atlassian.jira.plugin....
]
Paul Ferraro closed WFLY-9519.
------------------------------
Resolution: Rejected
The issue here is that your code injects the cache container, but does nothing to ensure
that the requested cache configuration is installed. While this code may have worked in
11.0.0.Alpha1, it was not to be relied upon (and would have been vulnerable to a race
condition between your deployment and the passively installed cache configuration).
You can either inject the desired cache directly:
{code:java}@Resource(lookup="java:jboss/infinispan/cache/custom-cache-container/custom-cache")
Cache<?, ?> cache;{code}
... or, alternatively, add a dependency on the cache configuration:
{code:java}@Resource(lookup="java:jboss/infinispan/container/custom-cache-container")
EmbeddedCacheManager manager;
@Resource(lookup="java:jboss/infinispan/configuration/custom-cache-container/custom-cache")
Configuration config;{code}
With the requisite dependency in place, you can safely call
manager.getCache("custom-cache") or
manager.getCacheConfiguration("custom-cache").
default values in
org.infinispan.configuration.cache.ExpirationConfiguration
----------------------------------------------------------------------------
Key: WFLY-9519
URL:
https://issues.jboss.org/browse/WFLY-9519
Project: WildFly
Issue Type: Bug
Components: Clustering
Affects Versions: 11.0.0.Beta1, 11.0.0.CR1, 11.0.0.Final
Reporter: R O
Assignee: Paul Ferraro
Attachments: wildfly-infinispan-showcase.tar.gz
I had noticed regression issue in WildFly's Infinispan submodule. Object of class
{{org.infinispan.configuration.cache.ExpirationConfiguration}} always contains default
values.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)