Topic
No replies
MJonker
MJonker
26 Posts
ACCEPTED ANSWER

Pinned topic How to know what the current transaction time-out is ?

‏2013-04-26T16:26:28Z |

Hi,

I am running a, container managed, Stateless Session bean that queries and updates tables in a MySQL database

This process takes a while and I am getting a transaction time out after 30 minutes, see stack trace below.

I have changed the defaultTransactionTimeoutSeconds to 6000 (from 600) , but I cannot related this to the 30 minutes after which the timeout occurs.

I have two questions:

  1. How can I see in my EJB what the current transaction timeout is ?
  2. What is the way to set the transactionTimeOut for EJB

Below you'll some technical details:

 

<gbean name="TransactionManager" class="org.apache.geronimo.transaction.wrapper.manager.GeronimoTransactionManagerGBean">
    <attribute name="defaultTransactionTimeoutSeconds">6000</attribute>
    <reference name="XidFactory">
      <name>XidFactory</name>
    </reference>
    <reference name="TransactionLog">
      <name>HOWLTransactionLog</name>
    </reference>
  </gbean>

in both plans...

..\repository\org\apache\geronimo\configs\client-transaction-1_6\3.0-w20120730\client-transaction-1_6-3.0-w20120730.car\META-INF\plan.xml

..\repository\org\apache\geronimo\configs\transaction-1_6\3.0-w20120730\transaction-1_6-3.0-w20120730.car\META-INF\plan.xml

 

 

 

2013-04-26 16:55:18,791 ERROR [StartUsageDataRetriever]] Servlet.service() for servlet [com.simservices.web.StartUsageDataRetriever] in context with path [/UsageData] threw exception
javax.ejb.EJBTransactionRolledbackException: Transaction was rolled back, presumably because setRollbackOnly was called during a synchronization
at org.apache.openejb.core.ivm.BaseEjbProxyHandler.convertException(BaseEjbProxyHandler.java:345)
at org.apache.openejb.core.ivm.BaseEjbProxyHandler.invoke(BaseEjbProxyHandler.java:288)
at $Proxy117.retrieveTelenorUsageData(Unknown Source)
at com.simservices.web.StartUsageDataRetriever.doGet(StartUsageDataRetriever.java:47)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:575)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:668)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:225)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
at org.apache.geronimo.tomcat.GeronimoStandardContext$SystemMethodValve.invoke(GeronimoStandardContext.java:731)
at org.apache.geronimo.tomcat.valve.GeronimoBeforeAfterValve.invoke(GeronimoBeforeAfterValve.java:48)
at org.apache.geronimo.tomcat.valve.ProtectedTargetValve.invoke(ProtectedTargetValve.java:53)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:999)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:565)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:307)
at org.apache.geronimo.pool.ThreadPool$1.run(ThreadPool.java:267)
at org.apache.geronimo.pool.ThreadPool$ContextClassLoaderRunnable.run(ThreadPool.java:397)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
Caused by: javax.transaction.RollbackException: Unable to commit: transaction marked for rollback
at org.apache.geronimo.transaction.manager.TransactionImpl.commit(TransactionImpl.java:272)
at org.apache.geronimo.transaction.manager.TransactionManagerImpl.commit(TransactionManagerImpl.java:252)
at org.apache.openejb.core.transaction.JtaTransactionPolicy.completeTransaction(JtaTransactionPolicy.java:324)
at org.apache.openejb.core.transaction.TxRequired.commit(TxRequired.java:75)
at org.apache.openejb.core.transaction.EjbTransactionUtil.afterInvoke(EjbTransactionUtil.java:73)
at org.apache.openejb.core.stateless.StatelessContainer._invoke(StatelessContainer.java:246)
at org.apache.openejb.core.stateless.StatelessContainer.invoke(StatelessContainer.java:178)
at org.apache.openejb.core.ivm.EjbObjectProxyHandler.synchronizedBusinessMethod(EjbObjectProxyHandler.java:255)
at org.apache.openejb.core.ivm.EjbObjectProxyHandler.businessMethod(EjbObjectProxyHandler.java:235)
at org.apache.openejb.core.ivm.EjbObjectProxyHandler._invoke(EjbObjectProxyHandler.java:92)
at org.apache.openejb.core.ivm.BaseEjbProxyHandler.invoke(BaseEjbProxyHandler.java:284)
... 24 more
Caused by: java.lang.Exception: Transaction has timed out
at org.apache.geronimo.transaction.manager.TransactionImpl.commit(TransactionImpl.java:266)