Update of /cvsroot/springnet/Spring.Net/src/Spring/Spring.Data/Data/Core
In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv9684/Core
Modified Files:
AdoPlatformTransactionManager.cs
Log Message:
NHibernate unit tests
SPRNET-714 - SessionFactory not bound to thread local storage if DbProvider for HibernateTransactionManager is null
SPRNET-715 - SpringSessionSynchronization did not close hibernate session with a nested transaction with TransactionPropagation.NotSupported
Index: AdoPlatformTransactionManager.cs
===================================================================
RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Data/Data/Core/AdoPlatformTransactionManager.cs,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** AdoPlatformTransactionManager.cs 3 Aug 2007 19:51:11 -0000 1.1
--- AdoPlatformTransactionManager.cs 29 Aug 2007 03:42:13 -0000 1.2
***************
*** 270,274 ****
--- 270,293 ----
}
+ /// <summary>
+ /// Set the given transaction rollback-only. Only called on rollback
+ /// if the current transaction takes part in an existing one.
+ /// </summary>
+ /// <param name="status">The status representation of the transaction.</param>
+ /// <exception cref="Spring.Transaction.TransactionException">
+ /// In the case of system errors.
+ /// </exception>
+ protected override void DoSetRollbackOnly(DefaultTransactionStatus status)
+ {
+ DbProviderTransactionObject txMgrStateObject =
+ (DbProviderTransactionObject)status.Transaction;
+ if (status.Debug)
+ {
+ IDbConnection conn = txMgrStateObject.ConnectionHolder.Connection;
+ log.Debug("Setting ADO.NET transaction [" + conn + ", " + conn.ConnectionString + "] rollback-only.");
+ }
+ txMgrStateObject.SetRollbackOnly();
+ }
protected override void DoCleanupAfterCompletion(object transaction)
{
***************
*** 333,337 ****
}
! public bool RollbackOnly
{
get
--- 352,361 ----
}
! /// <summary>
! /// Return whether the transaction is internally marked as rollback-only.
! /// </summary>
! /// <value></value>
! /// <returns>True of the transaction is marked as rollback-only.</returns>
! public override bool RollbackOnly
{
get
***************
*** 340,344 ****
}
}
!
}
--- 364,368 ----
}
}
!
}
|