Hi all,
Can anyone clarify what is the difference between decorating an operation with
OperationBehavior - TransactionScopeRequired = true
to
decorating it with TransactionFlow
Thanks in advance,
Guy
Hi all,
Can anyone clarify what is the difference between decorating an operation with
OperationBehavior - TransactionScopeRequired = true
to
decorating it with TransactionFlow
Thanks in advance,
Guy
TransactionFlow vs. OperationBehavior - TransactionScopeRequired
Davegraphix
In addition to what Madhu said,
TransactionScopeRequired doesn't neccessary mean that the transaction is flowing from the client to server. There are some transports (for example, NetMsmq transport) which can perform transactional Receive or Send operations. Transactions on the sender and receiver sides for such transports are separate and unrelated (that is, no transaction "flow" from sender to reciver). However if one marks the operation as TransactionScopeRequired for these, he/she will be able to access the transaction used by transport for the Receive and do some other work in the scope of this transaction. Aborting the transaction will have effect of aborting the Receive operation.
- leszek
Vishal Kalra
TransactionFlow attribute(AT SERVICE LEVEL)
===============
Transaction flow is enabled with the transactionFlow attribute, which may be set to true or false as shown in the following sample configuration(
http://windowssdk.msdn.microsoft.com/library/default.asp url=/library/en-us/WCF_samples/html/f8eecbcf-990a-4dbb-b29b-c3f9e3b396bd.asp)
If transaction method calling other methods in different service, Transaction context information will be sent to other service when you enable transactionFlow=true, so other service will know it has to join the transaction.
Typical scenarios, we will configure this option in app.config or web.config file
TransactionScopeRequired: (applies to method level)
=======================
Whatever we are going to execute in this method, it has to be transactional
Applies to methods and code blocks.
REFERENCE:
========
http://windowssdk.msdn.microsoft.com/library/default.asp url=/library/en-us/WCF_samples/html/f8eecbcf-990a-4dbb-b29b-c3f9e3b396bd.asp