Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-5959

Infinispan caches non transactional despite transactional cache mode

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 10.0.0.Final
    • 10.0.0.CR5
    • Clustering
    • None
    • Hide

      Declare a cache-container and a cache like this:
      {{<cache-container name="example">
      <local-cache name="localfullxa">
      <transaction mode="FULL_XA"/>
      </local-cache>
      </cache-container>}}

      Inject the cache container into a bean, obtain the advanced cache instance and print the transaction mode:

      {{@Resource(lookup = "java:jboss/infinispan/container/example")
      private CacheContainer container;
      ...
      Cache<String, String> cache = container.getCache("localfullxa");
      AdvancedCache<String, String> ac = cache.getAdvancedCache();
      log.warn("tx mode is " + ac.getCacheConfiguration().transaction().transactionMode());}}

      Expected result: mode to be TRANSACTIONAL (this is the case on WildFly9 and AS 7)
      Actual result: mode is NON_TRANSACTIONAL

      Show
      Declare a cache-container and a cache like this: {{<cache-container name="example"> <local-cache name="localfullxa"> <transaction mode="FULL_XA"/> </local-cache> </cache-container>}} Inject the cache container into a bean, obtain the advanced cache instance and print the transaction mode: {{@Resource(lookup = "java:jboss/infinispan/container/example") private CacheContainer container; ... Cache<String, String> cache = container.getCache("localfullxa"); AdvancedCache<String, String> ac = cache.getAdvancedCache(); log.warn("tx mode is " + ac.getCacheConfiguration().transaction().transactionMode());}} Expected result: mode to be TRANSACTIONAL (this is the case on WildFly9 and AS 7) Actual result: mode is NON_TRANSACTIONAL
    • Compatibility/Configuration
    • Hide

      Creating cache programmatically might be a workaround.

      Show
      Creating cache programmatically might be a workaround.

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

              pferraro@redhat.com Paul Ferraro
              alexslackx_jira Alexander Slack (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: