Hibernate Books

All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Hibernate 3.5.6 + Spring 3.1 + WebSphere 7 JTA Timeout issue
PostPosted: Wed Apr 04, 2012 4:35 pm 
Newbie

Joined: Wed Apr 04, 2012 4:07 pm
Posts: 1
Hello,

We are running into issues trying to apply the JTA timeout value in WebSphere using Spring 3.1 + Hibernate 3.5.6. In Spring 2.5.6, we were able to get around the issue by using org.springframework.transaction.jta.WebSphereTransactionManagerFactoryBean to retrieve the tranasction manager. However, this class was deprecated and finally removed as of Spring 3.x. Now, we are using the org.springframework.transaction.jta.WebSphereUowTransactionManager with only 1 issue- the default timeout value is not being applied to Hibernate. We have tried a variety of techniques to configure the timeout, such as using <tx:advice> with the transaction timeout, adding the parameter on the individual method annotations, and configuring the timeout values through WebSphere's transaction services on the cell manager. So far, none of these have worked. The standard way we were doing this before was set the timeout value in the bean definition:

Code:
      <bean id="jtaTransactionManager" class="org.springframework.transaction.jta.WebSphereUowTransactionManager">
         <property name="allowCustomIsolationLevels" value="true"/>
         <property name="defaultTimeout" value="60"/>
         <property name="transactionManager" ref="websphereTransactionManager"/>
      </bean>
      
      <bean id="websphereTransactionManager" class="com.ibm.ws.Transaction.TransactionManagerFactory" factory-method="getTransactionManager">
         <property name="defaultTimeout" value="60"/>
      </bean>




Unfortunately, this does not seem to help. I am still seeing the following stack-trace:


Code:
[4/2/12 14:23:48:576 EDT] 0000000e TimeoutManage I   WTRN0006W: Transaction 00000136744C4A110000000100000210A1DA9FA0488FFCC0659002899FBBAFAA60C9345F00000136744C4A110000000100000210A1DA9FA0488FFCC0659002899FBBAFAA60C9345F00000001 has timed out after 10 seconds.
[4/2/12 14:23:48:579 EDT] 0000000e TimeoutManage I   WTRN0124I: When the timeout occurred the thread with which the transaction is, or was most recently, associated was Thread[WebContainer : 5,5,main]. The stack trace of this thread when the timeout occurred was:
   java.util.HashMap.put(HashMap.java:605)
   org.hibernate.event.def.AbstractFlushingEventListener.postFlush(AbstractFlushingEventListener.java:370)
   org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:52)
   org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1206)
   org.springframework.orm.hibernate3.HibernateTemplate$28.doInHibernate(HibernateTemplate.java:883)
   org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:406)
   org.springframework.orm.hibernate3.HibernateTemplate.executeWithNativeSession(HibernateTemplate.java:374)
   org.springframework.orm.hibernate3.HibernateTemplate.flush(HibernateTemplate.java:881)



I am not quite sure where it is getting 10-seconds from for the timeout. Any assistance would be much appreciated.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.