Update of /cvsroot/springnet/Spring.Net/src/Spring/Spring.Data/Transaction/Support
In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv32606
Modified Files:
TransactionSynchronizationManager.cs
Log Message:
SPRNET-874 - Null reference accessing TransactionSynchronizationManager.CurrentTransactionIsolationLevel when no Spring managed transaction is active
Index: TransactionSynchronizationManager.cs
===================================================================
RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Data/Transaction/Support/TransactionSynchronizationManager.cs,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -d -r1.18 -r1.19
*** TransactionSynchronizationManager.cs 7 Sep 2007 02:47:00 -0000 1.18
--- TransactionSynchronizationManager.cs 17 Feb 2008 13:17:13 -0000 1.19
***************
*** 462,474 ****
/// <summary>
! /// Gets or sets the current transaction isolation level.
/// </summary>
/// <remarks>Called by the transaction manager on transaction begin and on cleanup.</remarks>
! /// <value>The current transaction isolation level.</value>
public static IsolationLevel CurrentTransactionIsolationLevel
{
get
{
! return (IsolationLevel) LogicalThreadContext.GetData(currentTxIsolationLevelDataSlotName);
}
set
--- 462,484 ----
/// <summary>
! /// Gets or sets the current transaction isolation level, if any.
/// </summary>
/// <remarks>Called by the transaction manager on transaction begin and on cleanup.</remarks>
! /// <value>The current transaction isolation level. If no current transaction is
! /// active, retrun IsolationLevel.Unspecified</value>
public static IsolationLevel CurrentTransactionIsolationLevel
{
get
{
! object data =
! LogicalThreadContext.GetData(currentTxIsolationLevelDataSlotName);
! if (data != null)
! {
! return (IsolationLevel) data;
! }
! else
! {
! return IsolationLevel.Unspecified;
! }
}
set
|