2 Replies Latest reply on Jul 27, 2012 9:40 AM by Naresh Pokuri

    Transaction time out not throwing any exception

    Naresh Pokuri Newbie

      Hi

      I am using JbossTS version 4.9.0GA. When transaction timeouts this JTA api won't throw any exception to let transaction manager to roll back. I hope this one just marks that transaction as read-only, due to which I am getting following exception

       

      com.mitrix.exceptions.NonRecoverableException: Error while doing database operation.

              at com.mitrix.dao.SQLExceptionLogger.logAndThrowException(SQLExceptionLogger.java:95)

              at com.mitrix.dao.impl.TemplatesDaoImpl$LoggingInterceptor.logSQLExceptionIfAvailable(TemplatesDaoImpl.java:490)

              at com.mitrix.dao.impl.TemplatesDaoImpl$LoggingInterceptor.logSQLExceptionIfAvailable(TemplatesDaoImpl.java:496)

              at com.mitrix.dao.impl.TemplatesDaoImpl$LoggingInterceptor.intercept(TemplatesDaoImpl.java:471)

              at com.mitrix.dao.impl.AscendHibernateTemplate$$EnhancerByCGLIB$$e7858c57.get(<generated>)

              at com.mitrix.dao.impl.TemplatesDaoImpl.get(TemplatesDaoImpl.java:50)

              at com.mitrix.scheduler.impl.SchedulerServiceImpl.saveJobAuditInfo(SchedulerServiceImpl.java:199)

              at com.mitrix.scheduler.TransactionalQuratzJobBean$2.doInTransactionWithoutResult(TransactionalQuratzJobBean.java:91)

              at org.springframework.transaction.support.TransactionCallbackWithoutResult.doInTransaction(TransactionCallbackWithoutResult.java:33)

              at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:130)

              at com.mitrix.scheduler.TransactionalQuratzJobBean.executeInternal(TransactionalQuratzJobBean.java:87)

              at org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:86)

              at org.quartz.core.JobRunShell.run(JobRunShell.java:202)

              at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:525)

      Caused by: java.sql.SQLException: [com.arjuna.ats.internal.jdbc.inactivetransaction] Transaction is not active on the thread!

              at com.arjuna.ats.internal.jdbc.ConnectionImple.checkTransaction(ConnectionImple.java:986)

              at com.arjuna.ats.internal.jdbc.ConnectionImple.isClosed(ConnectionImple.java:447)

              at org.hibernate.jdbc.ConnectionManager.isAutoCommit(ConnectionManager.java:212)

              at org.hibernate.jdbc.JDBCContext.afterNontransactionalQuery(JDBCContext.java:266)

              at org.hibernate.impl.SessionImpl.afterOperation(SessionImpl.java:587)

              at org.hibernate.impl.SessionImpl.get(SessionImpl.java:1002)

              at org.hibernate.impl.SessionImpl.get(SessionImpl.java:990)

              at org.springframework.orm.hibernate3.HibernateTemplate$1.doInHibernate(HibernateTemplate.java:519)

              at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:406)

              at org.springframework.orm.hibernate3.HibernateTemplate.executeWithNativeSession(HibernateTemplate.java:374)

              at org.springframework.orm.hibernate3.HibernateTemplate.get(HibernateTemplate.java:512)

              at org.springframework.orm.hibernate3.HibernateTemplate.get(HibernateTemplate.java:506)

              at org.springframework.orm.hibernate3.HibernateTemplate$$FastClassByCGLIB$$cf0d264a.invoke(<generated>)

              at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)

              at com.mitrix.dao.impl.TemplatesDaoImpl$LoggingInterceptor.intercept(TemplatesDaoImpl.java:467)

       

      Is it true, if so how can I make it throw an exception when transaction timesout?

      Plz guide me...