Update of /cvsroot/springnet/Spring.Net/src/Spring/Spring.Data/Transaction/Interceptor
In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv4322
Modified Files:
DefaultTransactionAttribute.cs TransactionAttribute.cs
Log Message:
SPRNET-606 Problems with Attributes in proxy generation - fix for regression bug copying Spring Transaction attributes, add unit test for this case.
Clean up misc documentation in code.
Index: DefaultTransactionAttribute.cs
===================================================================
RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Data/Transaction/Interceptor/DefaultTransactionAttribute.cs,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** DefaultTransactionAttribute.cs 1 Aug 2007 18:53:14 -0000 1.7
--- DefaultTransactionAttribute.cs 21 Oct 2007 18:16:38 -0000 1.8
***************
*** 25,29 ****
{
/// <summary>
! /// Transaction attribute approach to rolling back on system exceptions, no other
/// exceptions by default.
/// </summary>
--- 25,29 ----
{
/// <summary>
! /// Transaction attribute approach to rolling back on all exceptions, no other
/// exceptions by default.
/// </summary>
Index: TransactionAttribute.cs
===================================================================
RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Data/Transaction/Interceptor/TransactionAttribute.cs,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** TransactionAttribute.cs 8 Aug 2007 20:59:50 -0000 1.6
--- TransactionAttribute.cs 21 Oct 2007 18:16:38 -0000 1.7
***************
*** 33,38 ****
/// .NET Attribute for describing transactional behavior of methods in a class.
/// </summary>
! /// <remarks>Defines metadata that is used to create a
! /// <see cref="RuleBasedTransactionAttribute"/>.</remarks>
/// <author>Mark Pollack (.NET)</author>
/// <version>$Id$</version>
--- 33,51 ----
/// .NET Attribute for describing transactional behavior of methods in a class.
/// </summary>
! /// <remarks>This attribute type is generally directly comparable
! /// to Spring's <see cref="RuleBasedTransactionAttribute"/> class and
! /// in fact <see cref="AttributesTransactionAttributeSource"/> will
! /// directly convert the data to a <see cref="RuleBasedTransactionAttribute"/>
! /// so that Spring's transaction support code does not have to know about
! /// attributes. If no rules are relevant to the exception it will be treaded
! /// like DefaultTransactionAttribute, (rolling back on all exceptions).
! /// <para>
! /// The default property values are TransactionPropagation.Required, IsolationLevel.Unspecified,
! /// DefaultTransactionDefinition.TIMEOUT_DEFAULT (can be changed, by default is the default
! /// value of the underlying transaction subsystem)
! /// ReadOnly = false, and Type.EmtptyTypes specified for Rollbackfor and NoRollbackFor exception
! /// types.
! /// </para>
! /// </remarks>
/// <author>Mark Pollack (.NET)</author>
/// <version>$Id$</version>
***************
*** 50,54 ****
private Type[] _noRollbackTypes = Type.EmptyTypes;
#if NET_2_0
! private System.Transactions.EnterpriseServicesInteropOption _esInteropOption;
#endif
--- 63,68 ----
private Type[] _noRollbackTypes = Type.EmptyTypes;
#if NET_2_0
! private System.Transactions.EnterpriseServicesInteropOption _esInteropOption =
! System.Transactions.EnterpriseServicesInteropOption.Automatic;
#endif
***************
*** 58,62 ****
/// <summary>
/// Initializes a new instance of the <see cref="TransactionAttribute"/> class.
! /// </summary>
public TransactionAttribute()
{
--- 72,76 ----
/// <summary>
/// Initializes a new instance of the <see cref="TransactionAttribute"/> class.
! /// </summary>
public TransactionAttribute()
{
***************
*** 64,72 ****
}
public TransactionAttribute(TransactionPropagation transactionPropagation) : this()
{
_transactionPropagation = transactionPropagation;
! }
!
public TransactionAttribute(TransactionPropagation transactionPropagation,
IsolationLevel isolationLevel) : this(transactionPropagation)
--- 78,95 ----
}
+ /// <summary>
+ /// Initializes a new instance of the <see cref="TransactionAttribute"/> class.
+ /// </summary>
+ /// <param name="transactionPropagation">The transaction propagation.</param>
public TransactionAttribute(TransactionPropagation transactionPropagation) : this()
{
_transactionPropagation = transactionPropagation;
! }
!
! /// <summary>
! /// Initializes a new instance of the <see cref="TransactionAttribute"/> class.
! /// </summary>
! /// <param name="transactionPropagation">The transaction propagation.</param>
! /// <param name="isolationLevel">The isolation level.</param>
public TransactionAttribute(TransactionPropagation transactionPropagation,
IsolationLevel isolationLevel) : this(transactionPropagation)
***************
*** 75,82 ****
--- 98,119 ----
}
+ /// <summary>
+ /// Initializes a new instance of the <see cref="TransactionAttribute"/> class.
+ /// </summary>
+ /// <param name="isolationLevel">The isolation level.</param>
+ public TransactionAttribute(IsolationLevel isolationLevel)
+ {
+ _isolationLevel = isolationLevel;
+ }
+
#endregion
#region Properties
+ /// <summary>
+ /// Gets the transaction propagation.
+ /// </summary>
+ /// <remarks>Defaults to TransactionPropagation.Required</remarks>
+ /// <value>The transaction propagation.</value>
public TransactionPropagation TransactionPropagation
{
***************
*** 84,87 ****
--- 121,129 ----
}
+ /// <summary>
+ /// Gets the isolation level.
+ /// </summary>
+ /// <remarks>Defaults to IsolationLevel.Unspecified</remarks>
+ /// <value>The isolation level.</value>
public IsolationLevel IsolationLevel
{
***************
*** 89,92 ****
--- 131,139 ----
}
+ /// <summary>
+ /// Gets or sets the timeout.
+ /// </summary>
+ /// <remarks>Defaults to the default timeout of the underlying transaction system.</remarks>
+ /// <value>The timeout.</value>
public int Timeout
{
***************
*** 95,98 ****
--- 142,150 ----
}
+ /// <summary>
+ /// Gets or sets a value indicating whether the transaction is readonly.
+ /// </summary>
+ /// <remarks>Defaults to false</remarks>
+ /// <value><c>true</c> if read-only; otherwise, <c>false</c>.</value>
public bool ReadOnly
{
***************
*** 101,104 ****
--- 153,164 ----
}
+ /// <summary>
+ /// Gets or sets the zero or more exception types which
+ /// indicating which exception types must cause a transaction
+ /// rollback.
+ /// </summary>
+ /// <remarks>This is the preferred way to construct a rollback rule,
+ /// matching the exception class and subclasses.</remarks>
+ /// <value>The rollback types.</value>
public Type[] RollbackFor
{
***************
*** 107,110 ****
--- 167,178 ----
}
+ /// <summary>
+ /// Gets or sets zero or more exceptions types which
+ /// indicationg which exception type must <c>not</c>
+ /// cause a transaction rollback.
+ /// </summary>
+ /// <remarks>This is the preferred way to construct a rollback rule,
+ /// matching the exception type.</remarks>
+ /// <value>The no rollback for.</value>
public Type[] NoRollbackFor
{
***************
*** 115,118 ****
--- 183,190 ----
#if NET_2_0
+ /// <summary>
+ /// Gets or sets the enterprise services interop option.
+ /// </summary>
+ /// <value>The enterprise services interop option.</value>
public System.Transactions.EnterpriseServicesInteropOption EnterpriseServicesInteropOption
{
|