0 Replies Latest reply on Nov 22, 2013 11:05 AM by POOJA KHAMBHAYATA

    Infinispan forces to use transactions in Weblogic Server

    POOJA KHAMBHAYATA Newbie

      Hello All,

       

      Below are my setup details:

       

      Application Server: Weblogic 10.3

      Infinispan version: 5.3.0.Final

      Mode: Library Mode

      Operating System: Linux

       

      I am using TreeCache API since we migrated from JBoss Cache.

       

      What I see is , when I run the code against normal linux or windows machines. put and get works fine.

      But when I run code against Weblogic server, put never succedded saying Transaction Failed. (XA Transaction)

       

      I made this work , by declaring Transactions through xml file as below:

      <transaction

                  transactionManagerLookupClass="org.infinispan.transaction.lookup.GenericTransactionManagerLookup"

                  lockingMode="OPTIMISTIC"

                  transactionMode="TRANSACTIONAL"

      />

       

      It still did not work. then I had to call weblogic UserTransaction , by following

       

      "

      @Resource

      private static UserTransaction utx ;

       

      utx = new InitialContext().lookup("java:comp/UserTransaction");

       

       

      and then use utx.begin();

      before saving entry

      and utx.commit():

      "

       

      It is only after doing above in quotes, that I see an entry in the cache and can retrieve it successfully

       

       

      I want to understand why is it so? Can I just not avoid using transactions?

       

      Below is the xml config file:

       

      <global>
              <globalJmxStatistics    enabled = "true" />

              <transport clusterName = "CACHE_CLUSTER">
                      <properties>
                              <property       name="configurationFile"
                                              value="tcp.xml" />
                      </properties>
              </transport>

         </global>

         <default>

              <clustering mode="replication">
                      <async asyncMarshalling="true" useReplQueue="true" replQueueInterval="10" replQueueMaxElements="100" />
                      <stateTransfer timeout="2000000"/>
              </clustering>

              <transaction
                  transactionManagerLookupClass="org.infinispan.transaction.lookup.GenericTransactionManagerLookup"
                  lockingMode="OPTIMISTIC"
                  transactionMode="TRANSACTIONAL"
                  />

              <invocationBatching             enabled                 = "true"/>
              <jmxStatistics enabled="true"/>
         </default>