[jboss-jira] [JBoss JIRA] (WFLY-5959) Infinispan caches non transactional despite transactional cache mode
Paul Ferraro (JIRA)
issues at jboss.org
Sun Jan 10 15:31:00 EST 2016
[ https://issues.jboss.org/browse/WFLY-5959?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13146747#comment-13146747 ]
Paul Ferraro commented on WFLY-5959:
------------------------------------
Injecting a cache container into a bean doesn't magically install its cache configurations. These are installed only when some service demands them to start (e.g. a service dependency on a cache). Because you are starting the cache manually, this never happens.
You should instead inject the cache directly, e.g.
{code:java}
@Resource(lookup = "java:jboss/infinispan/cache/example/localfullxa")
private Cache<String, String> cache;
{code}
Perhaps we should have cache configurations installed as PASSIVE instead of ON_DEMAND - however, something still needs to require the requisite transaction manager to start, since even if PASSIVE, the configuration will not be installed until its dependencies are available.
> Infinispan caches non transactional despite transactional cache mode
> --------------------------------------------------------------------
>
> Key: WFLY-5959
> URL: https://issues.jboss.org/browse/WFLY-5959
> Project: WildFly
> Issue Type: Bug
> Components: Clustering
> Affects Versions: 10.0.0.CR5
> Reporter: Alexander Slack
> Assignee: Paul Ferraro
>
> Local Infinispan caches declared in standalone.xml are no longer set as transactional even if a transactional mode is selected.
> This prevents creation of atomic maps using AtomicMapLookup as that specifically checks if the cache is transactional (throws java.lang.IllegalStateException: AtomicMap needs a transactional cache.)
> Possibly caused by issue WFLY-5327.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
More information about the jboss-jira
mailing list