Kanakaraju
07-03-2007, 03:11 PM
Hi,
I am using TxScopeTransactionManager for transaction handling and using method level transactions by placing the [Transaction()] attribute on the service methods.
I am getting errors when I have nested transactions. If a method that is in a transaction scope (by having the Transaction attribute) invokes another method that is also in the transaction scope, the second method is throwing an error or exception. If I delete the transaction attribute on either of the methods, then they are working fine.
I am getting the following exception Trace:
-------------
Transaction manager [TxScopeTransactionManager] does not support transaction suspension
Spring.Transaction.TransactionSuspensionNotSupport edException was unhandled by user code
Message="Transaction manager [TxScopeTransactionManager] does not support transaction suspension"
Source="Spring.Data"
StackTrace:
at Spring.Transaction.Support.AbstractPlatformTransac tionManager.DoResume(Object transaction, Object
suspendedResources)
at Spring.Transaction.Support.AbstractPlatformTransac tionManager.resume(Object transaction, Object
suspendedResources)
at
Spring.Transaction.Support.AbstractPlatformTransac tionManager.cleanupAfterCompletion(DefaultTransact ionStatus
status)
at Spring.Transaction.Support.AbstractPlatformTransac tionManager.ProcessCommit(DefaultTransactionStatus
status)
at Spring.Transaction.Support.AbstractPlatformTransac tionManager.Commit(ITransactionStatus
transactionStatus)
at
Spring.Transaction.Interceptor.TransactionAspectSu pport.DoCommitTransactionAfterReturning(Transactio nInfo
transactionInfo)
at Spring.Transaction.Interceptor.TransactionIntercep tor.Invoke(IMethodInvocation invocation)
at Spring.Aop.Framework.AbstractMethodInvocation.Proc eed()
at Spring.Aop.Framework.DynamicProxy.AdvisedProxy.Inv oke(Object proxy, Object target, Type targetType,
MethodInfo targetMethod, Object[] args, IList interceptors)
at CompositionAopProxy_87a4828668fa492a81721c24177d2b d0.FindByName(String username)
at AcmeBank.Server.Service.AuthenticationService.Auth enticate(String username, String password) in
D:\Spring\Apps\Reference-Implementation-2\AcmeBank\AcmeBank.Server\Service\AuthenticationS ervice.cs:line 25
at Spring.DynamicReflection.Method_Authenticate_d8d33 074625d4ac3b4c0d420ebe1d329.Invoke(Object target,
Object[] args)
at Spring.Util.DynamicReflection.SafeMethod.Invoke(Ob ject target, Object[] arguments)
at Spring.Aop.Framework.ReflectiveMethodInvocation.In vokeJoinpoint()
at Spring.Aop.Framework.AbstractMethodInvocation.Proc eed()
at Spring.Transaction.Interceptor.TransactionIntercep tor.Invoke(IMethodInvocation invocation)
------------------
Has anyone faced a similar issue? Any help figuring out how I can handle this issue is highly appreciated.
Thanks
Kanakaraju
I am using TxScopeTransactionManager for transaction handling and using method level transactions by placing the [Transaction()] attribute on the service methods.
I am getting errors when I have nested transactions. If a method that is in a transaction scope (by having the Transaction attribute) invokes another method that is also in the transaction scope, the second method is throwing an error or exception. If I delete the transaction attribute on either of the methods, then they are working fine.
I am getting the following exception Trace:
-------------
Transaction manager [TxScopeTransactionManager] does not support transaction suspension
Spring.Transaction.TransactionSuspensionNotSupport edException was unhandled by user code
Message="Transaction manager [TxScopeTransactionManager] does not support transaction suspension"
Source="Spring.Data"
StackTrace:
at Spring.Transaction.Support.AbstractPlatformTransac tionManager.DoResume(Object transaction, Object
suspendedResources)
at Spring.Transaction.Support.AbstractPlatformTransac tionManager.resume(Object transaction, Object
suspendedResources)
at
Spring.Transaction.Support.AbstractPlatformTransac tionManager.cleanupAfterCompletion(DefaultTransact ionStatus
status)
at Spring.Transaction.Support.AbstractPlatformTransac tionManager.ProcessCommit(DefaultTransactionStatus
status)
at Spring.Transaction.Support.AbstractPlatformTransac tionManager.Commit(ITransactionStatus
transactionStatus)
at
Spring.Transaction.Interceptor.TransactionAspectSu pport.DoCommitTransactionAfterReturning(Transactio nInfo
transactionInfo)
at Spring.Transaction.Interceptor.TransactionIntercep tor.Invoke(IMethodInvocation invocation)
at Spring.Aop.Framework.AbstractMethodInvocation.Proc eed()
at Spring.Aop.Framework.DynamicProxy.AdvisedProxy.Inv oke(Object proxy, Object target, Type targetType,
MethodInfo targetMethod, Object[] args, IList interceptors)
at CompositionAopProxy_87a4828668fa492a81721c24177d2b d0.FindByName(String username)
at AcmeBank.Server.Service.AuthenticationService.Auth enticate(String username, String password) in
D:\Spring\Apps\Reference-Implementation-2\AcmeBank\AcmeBank.Server\Service\AuthenticationS ervice.cs:line 25
at Spring.DynamicReflection.Method_Authenticate_d8d33 074625d4ac3b4c0d420ebe1d329.Invoke(Object target,
Object[] args)
at Spring.Util.DynamicReflection.SafeMethod.Invoke(Ob ject target, Object[] arguments)
at Spring.Aop.Framework.ReflectiveMethodInvocation.In vokeJoinpoint()
at Spring.Aop.Framework.AbstractMethodInvocation.Proc eed()
at Spring.Transaction.Interceptor.TransactionIntercep tor.Invoke(IMethodInvocation invocation)
------------------
Has anyone faced a similar issue? Any help figuring out how I can handle this issue is highly appreciated.
Thanks
Kanakaraju