Uploaded image for project: 'Spring.NET'
  1. Spring.NET
  2. SPRNET-1461

Transaction Timeout value not adhered while using TransactionAttribute

    Details

      Description

      Transaction timeout value seem to be not adhered if one configures using the TransactionAttribute. It is adhered if TransactionTemplate API is used.

      I suspect the problem might lie in the following piece of code where the RulebasedTransactionAttribute is not populated with the Timeout value there by leaving it as default i.e. DefaultTransactionDefinition.DEFAULT_TIMEOUT.

      protected override ITransactionAttribute FindTransactionAttribute(Attribute[] attributes)

      { if (attributes == null) { return null; } foreach (Attribute attr in attributes) { if (attr is TransactionAttribute) { TransactionAttribute ta = (TransactionAttribute)attr; RuleBasedTransactionAttribute rbta = new RuleBasedTransactionAttribute(); //TODO another reminder to sync property names rbta.PropagationBehavior = ta.TransactionPropagation; rbta.TransactionIsolationLevel = ta.IsolationLevel; rbta.ReadOnly = ta.ReadOnly; #if NET_2_0 rbta.EnterpriseServicesInteropOption = ta.EnterpriseServicesInteropOption; #endif Type[] rbf = ta.RollbackFor; IList rollBackRules = new ArrayList(); if (rbf != null) { foreach (Type t in rbf) { RollbackRuleAttribute rule = new RollbackRuleAttribute(t); rollBackRules.Add(rule); } } Type[] nrbfc = ta.NoRollbackFor; if (nrbfc != null) { foreach (Type t in nrbfc) { NoRollbackRuleAttribute rule = new NoRollbackRuleAttribute(t); rollBackRules.Add(rule); } } rbta.RollbackRules = rollBackRules; return rbta; }

      }
      return null;
      }

        Attachments

          Activity

            People

            • Assignee:
              sbohlen Steve Bohlen
              Reporter:
              ramiahbala Ramiah Balasubramanian
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: