Java spring transaction could not rollback

Jumpstyler

New Member
Java spring SQL Server enterprise edition 2008I am using a transaction manager as follows which usually works very well\[code\] <tx:advice id="TxAdvice" transaction-manager="TransactionManager"> <tx:attributes> <tx:method name="*" propagation="REQUIRED" rollback-for="java.lang.Throwable"/> </tx:attributes> </tx:advice> <aop:config> <aop:advisor pointcut="execution(* com.rdc.*.*Dao.*(..))" advice-ref="TxAdvice"/> </aop:config>\[/code\]But i found unusual situation while executing following method on line 2 database lock occurs and sqlserver 2008 generated database lock time out and statement 1 record become permanent instead of rollback data ? and generate exception\[code\]public void linkDao(){insert(); // 1update(); // 2delete(); // 3}StackTrace: org.springframework.transaction.TransactionSystemException: Could not roll back JDBC transaction; nested exception is java.sql.SQLException: Invalid state, the Connection object is closed.at org.springframework.jdbc.datasource.DataSourceTransactionManager.doRollback(DataSourceTransactionManager.java:279)at org.springframework.transaction.support.AbstractPlatformTransactionManager.processRollback(AbstractPlatformTransactionManager.java:823)at org.springframework.transaction.support.AbstractPlatformTransactionManager.rollback(AbstractPlatformTransactionManager.java:800)at org.springframework.transaction.interceptor.TransactionAspectSupport.completeTransactionAfterThrowing(TransactionAspectSupport.java:339)\[/code\]
 
Back
Top