Update of /cvsroot/springnet/Spring.Net/src/Spring/Spring.Data/Data/Core
In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv22925
Modified Files:
AdoPlatformTransactionManager.cs
Log Message:
SPRNET-770 Nested RequiresNew propagaion options not working in AdoPlatformTransaction manager
SPRNET-769 Resume and throw exception if exception is thrown at start of transaction.
Index: AdoPlatformTransactionManager.cs
===================================================================
RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Data/Data/Core/AdoPlatformTransactionManager.cs,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** AdoPlatformTransactionManager.cs 30 Oct 2007 15:24:44 -0000 1.5
--- AdoPlatformTransactionManager.cs 12 Nov 2007 19:57:58 -0000 1.6
***************
*** 145,149 ****
try
{
! if (txMgrStateObject.ConnectionHolder == null)
{
IDbConnection newCon = DbProvider.CreateConnection();
--- 145,149 ----
try
{
! if (txMgrStateObject.ConnectionHolder == null || txMgrStateObject.ConnectionHolder.SynchronizedWithTransaction)
{
IDbConnection newCon = DbProvider.CreateConnection();
***************
*** 197,204 ****
}
!
! // *********************************
! // TODO consider DoSuspend/DoResume/DoSetRollbackOnly functionality....
! // *********************************
/// <summary>
--- 197,250 ----
}
!
! /// <summary>
! /// Suspend the resources of the current transaction.
! /// </summary>
! /// <param name="transaction">Transaction object returned by
! /// <see cref="Spring.Transaction.Support.AbstractPlatformTransactionManager.DoGetTransaction"/>.</param>
! /// <returns>
! /// An object that holds suspended resources (will be kept unexamined for passing it into
! /// <see cref="Spring.Transaction.Support.AbstractPlatformTransactionManager.DoResume"/>.)
! /// </returns>
! /// <remarks>
! /// Transaction synchronization will already have been suspended.
! /// </remarks>
! /// <exception cref="Spring.Transaction.IllegalTransactionStateException">
! /// If suspending is not supported by the transaction manager implementation.
! /// </exception>
! /// <exception cref="Spring.Transaction.TransactionException">
! /// in case of system errors.
! /// </exception>
! protected override object DoSuspend(object transaction)
! {
! DbProviderTransactionObject txMgrStateObject = (DbProviderTransactionObject)transaction;
! txMgrStateObject.ConnectionHolder = null;
! ConnectionHolder conHolder = (ConnectionHolder) TransactionSynchronizationManager.UnbindResource(DbProvider);
! return conHolder;
! }
!
!
! /// <summary>
! /// Resume the resources of the current transaction.
! /// </summary>
! /// <param name="transaction">Transaction object returned by
! /// <see cref="Spring.Transaction.Support.AbstractPlatformTransactionManager.DoGetTransaction"/>.</param>
! /// <param name="suspendedResources">The object that holds suspended resources as returned by
! /// <see cref="Spring.Transaction.Support.AbstractPlatformTransactionManager.DoSuspend"/>.</param>
! /// <remarks>
! /// Transaction synchronization will be resumed afterwards.
! /// </remarks>
! /// <exception cref="Spring.Transaction.IllegalTransactionStateException">
! /// If suspending is not supported by the transaction manager implementation.
! /// </exception>
! /// <exception cref="Spring.Transaction.TransactionException">
! /// In the case of system errors.
! /// </exception>
! protected override void DoResume(object transaction, object suspendedResources)
! {
! ConnectionHolder conHolder = (ConnectionHolder)suspendedResources;
! TransactionSynchronizationManager.BindResource(DbProvider, conHolder);
! }
!
/// <summary>
|