[SPRNET-1517] Transaction attribute 'timeout' not propagated when using TxScopeTransactionManager Created: 25/Jul/12  Updated: 29/Jan/15  Resolved: 29/Jan/15

Status: Closed
Project: Spring.NET
Component/s: Spring-NET-TX
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Manuel Meyer Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: 0d
Time Spent: Not Specified
Original Estimate: 0d
Environment:

windows 7



 Description   

Putting a Timeout value in a Transaction attribute has no effect.
I suspect the following method in class Spring.Transaction.Interceptor.AttributesTransactionAttributeSource to be responsible.

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;

The timeout attribute is never copied
so we endup with the default machine timeout of 10mn which was unfortunatly not enough for us.

Regards,
Manuel



 Comments   
Comment by Oliver Drotbohm [ 27/Jul/12 ]

Are you sure you filed this for the right project? From the code given it looks like this is targetting the Spring.NET project rather, isn't it?

Comment by Mattias Öhrn [ 11/Dec/12 ]

This looks like a duplicate of SPRNET-1461 to me.

Generated at Sat Jan 25 17:38:20 UTC 2020 using Jira 7.13.8#713008-sha1:1606a5c1e7006e1ab135aac81f7a9566b2dbc3a6.