1 Reply Latest reply on Jun 21, 2012 7:03 AM by mgencur

    Infinispan + Jboss 7 transactions


      Hi everyone,

      I'm using Infinispan inside Jboss AS 7.1.1.Final as Hibernate 2LC and I'm wondering about the meaning of the <transaction> configuration, in particular about the mode attribute, beacuse I read from the doc (https://docs.jboss.org/author/display/ISPN51/Infinispan+transactions) that it should only be TRANSACTIONAL or NON_TRANSACTIONAL but in the schema (jboss-as-infinispan_1_2.xsd) the possible values are NONE, NON_XA, NON_DURABLE_XA and FULL_XA.


      Which is the difference between those values?

      Why in the default configuration for 2LC (see below), the entity cache is NON_XA and the others (timestamps and query) are NONE? Is it not better (and safe) to enable transactions for every cache?


      As note: I'm working in a cluster environment.



      <cache-container name="hibernate" default-cache="local-query">

                      <transport lock-timeout="60000"/>

                      <local-cache name="local-query">

                          <transaction mode="NONE"/>

                          <eviction strategy="LRU" max-entries="10000"/>

                          <expiration max-idle="100000"/>


                      <invalidation-cache name="entity" mode="SYNC">

                          <transaction mode="NON_XA"/>

                          <eviction strategy="LRU" max-entries="10000"/>

                          <expiration max-idle="100000"/>


                      <replicated-cache name="timestamps" mode="ASYNC">

                          <transaction mode="NONE"/>

                          <eviction strategy="NONE"/>



        • 1. Re: Infinispan + Jboss 7 transactions

          Hi Alessandro,

          the configuration of Infinispan in AS7 is a little bit different than for standalone Infinispan. That's why not all configuration elements map to their Infinispan equivalents.

          For configuring transactions and the mode, you have the following options:


          NONE - no transactions are used in any sense

          NON_XA - it maps to the following settings in Infinispan: transaction.useSynchronization == true, transaction.recovery.enabled == false

          NON_DURABLE_XA - transaction.useSynchronization == false, transaction.recovery.enabled == false, transaction.syncCommitPhase == true, transaction.syncRollbackPhase == true

          FULL_XA - transaction.syncCommitPhase == true, transaction.syncRollbackPhase == true, transaction.useSynchronization == false, transaction.recovery.enabled == true


          I hope I did not make any mistake