4 Replies Latest reply: May 22, 2012 3:05 PM by dex chen RSS

ActionStatus.ABORTED

dex chen Novice

I am using PESSIMIC lockingMode with JBossStatndaloneJTAManagerLookup, and got the following exception when some transaction takes longer.

 

I am thnking it may due to lock/transaction time out.  I did not see any way to configure the timeout. Is there a way to configure/set the timeout for the transaction in xml file?

 

Here is my config:

<namedCache name="ispn-locktoken">

          <clustering mode="local">

         <stateTransfer fetchInMemoryState="true" timeout="240000"/>

      </clustering>

      <transaction cacheStopTimeout="30000" eagerLockSingleNode="false" lockingMode="PESSIMISTIC" syncCommitPhase="false" syncRollbackPhase="false" transactionManagerLookupClass="org.infinispan.transaction.lookup.JBossStandaloneJTAManagerLookup" transactionMode="TRANSACTIONAL" useEagerLocking="true"/>

 

      <!--  time units below are millseconds -->

      <expiration lifespan="-1" maxIdle="-1" wakeUpInterval="1000"/>

 

    </namedCache>

 

 

 

2012-05-15/13:57:01.806/MDT [Thread-32] ERROR org.infinispan.interceptors.InvocationContextInterceptor[146] - ISPN000136: Execution error

java.lang.IllegalStateException: Transaction TransactionImple < ac, BasicAction: 0:ffffc0a8133d:97af:4fb2aed0:36 status: ActionStatus.ABORTED > is not in a valid state to be invoking cache operations on.

     at org.infinispan.interceptors.TxInterceptor.enlist(TxInterceptor.java:230)

     at org.infinispan.interceptors.TxInterceptor.enlistWriteAndInvokeNext(TxInterceptor.java:204)

     at org.infinispan.interceptors.TxInterceptor.visitPutKeyValueCommand(TxInterceptor.java:149)

     at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:77)

     at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116)

     at org.infinispan.interceptors.InvocationContextInterceptor.handleAll(InvocationContextInterceptor.java:131)

     at org.infinispan.interceptors.InvocationContextInterceptor.handleDefault(InvocationContextInterceptor.java:90)

     at org.infinispan.commands.AbstractVisitor.visitPutKeyValueCommand(AbstractVisitor.java:62)

     at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:77)

     at org.infinispan.interceptors.InterceptorChain.invoke(InterceptorChain.java:345)

     at org.infinispan.CacheImpl.executeCommandAndCommitIfNeeded(CacheImpl.java:1006)

     at org.infinispan.CacheImpl.put(CacheImpl.java:702)

     at org.infinispan.CacheImpl.put(CacheImpl.java:694)

     at org.infinispan.CacheSupport.put(CacheSupport.java:128)

  • 1. Re: ActionStatus.ABORTED
    Galder Zamarreño Master

    Interesting question

     

    Indeed, that exception is the result of the transaction timing out.

     

    Looking at the JBoss Transactions source code, transaction timeout is 60 seconds (from CoordinatorEnvironmentBean).

     

    The way to configure it would to create a file called jbossts-properties.xml and put it at the root of your classpath with contents:

     

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
    <properties>
        <entry key="CoordinatorEnvironmentBean.defaultTimeout">300</entry> 
    </properties>
    

     

    Note that I have not tried this but in theory, it should work.

     

    If you wanna see if this takes effect, put a break point in com.arjuna.ats.arjuna.common.CoordinatorEnvironmentBean.setDefaultTimeout() to see if it has the right effect.

     

    Let us know if it works and we'll add it to the docu.

     

    In the future we might wanna make this easier to configure.

  • 2. Re: ActionStatus.ABORTED
    dex chen Novice

    Thanks Galder. I tried set transaction time out on TransactionManager instance got back from the AdvancedCache right now. It seems to work. It would be nice to expose this configureation through Infinispan confiuration.

  • 3. Re: ActionStatus.ABORTED
    Galder Zamarreño Master

    Oh, I had forgotten you could set it directly on the TransactionManager instance. Would you mind submitting an enhancement in http://issues.jboss.org/browse/ISPN? Cheers