Announcement Announcement Module
Collapse
No announcement yet.
Transaction Timeout HELP!!! Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Transaction Timeout HELP!!!

    Hi, I am facing a problem and I hope someone can help me.

    I am using Spring 2.5.6 and Hibernate 3.

    For transaction Manager, I am using the HibernateTransactionManager.

    The transaction definitions are as follows:

    Code:
    	<aop:config>
    		<aop:pointcut id="tnxService" expression="execution(* pro..business.*.*(..))" />	
    		
    		<aop:advisor advice-ref="defaultTransactionAdvice" pointcut-ref="tnxService" />			
    	</aop:config>
    	
    	<tx:advice id="defaultTransactionAdvice" transaction-manager="transactionManager">
    		<tx:attributes>
    			<tx:method name="do*"
    				isolation="READ_COMMITTED"
    				propagation="REQUIRED"
    				timeout="120"/>
    				
    			<tx:method name="save*"
    				isolation="READ_COMMITTED"
    				propagation="REQUIRED"
    				timeout="120"/>
    				
    			<tx:method name="delete*"
    				isolation="READ_COMMITTED"
    				propagation="REQUIRED"
    				timeout="120"/>				
    
    			<tx:method name="create*"
    				isolation="READ_COMMITTED"
    				propagation="REQUIRED"
    				timeout="120"/>	
    
    			<tx:method name="update*"
    				isolation="READ_COMMITTED"
    				propagation="REQUIRED"
    				timeout="120"/>
    											
    			<!-- tx:method name="execute*"
    				isolation="READ_COMMITTED"
    				propagation="REQUIRED"
    				timeout="120"/ -->
    			<!--
    			<tx:method name="get*"
    				propagation="NOT_SUPPORTED"
    				read-only="true"/>
    			
    			<tx:method name="search*"
    				propagation="NOT_SUPPORTED"
    				read-only="true"/>	
    			-->
    		</tx:attributes>
    	</tx:advice>
    </beans>
    My problem lies with transaction timeout. When I attempt to lock a record using the "for update" in oracle (Suggested by http://ramonli.blogspot.sg/2011/09/s...esnt-work.html, after sometime I expect to see the ORA-01013 error; which I see it on my staging server.

    Code:
    415322 [http-8181-2] 18:29:00,246 [PRO]  WARN [org.hibernate.util.JDBCExceptionReporter]  - SQL Error: 1013, SQLState: 72000
    415322 [http-8181-2] 18:29:00,246 [PRO] ERROR [org.hibernate.util.JDBCExceptionReporter]  - ORA-01013: user requested cancel of current operation
    
    415325 [http-8181-2] 18:29:00,249 [PRO] ERROR [org.hibernate.event.def.AbstractFlushingEventListener]  - Could not synchronize database state with session
    org.hibernate.exception.GenericJDBCException: could not update
    This is all ok, and expected. However, this behaviour is not shown on my production server, resulting in hung threads as the database records are locked; which should not happen as I expect a timeout.

    Can someone please advice? Thanks!

  • #2
    Anyone can advise? Stuck with this and my users are screaming for a solution.

    Comment


    • #3
      I just got more info about this issue. I am using WAS as the application server, and Oracle RAC as my DB. Just found out that Spring does not handle RAC. Is this the reason to why I am not seeing the similar behaviour in production?

      http://forum.springsource.org/showth...10g-RAC-Issues

      Comment

      Working...
      X