Would there be drawbacks with not using WCF's concurrency and transaction management mechanisms in a large multiuser application? RRS feed

  • Question

  • Gurus!

    I have a large application that can potentially be used by upto 1000 users simultaneously. Each of these users could be making several database updates in the application. My application uses WCF to connect to the UI layer to the middle tier. However, for transaction management, I am completely depending on the database's transaction management mechanism. I am also using the SqlTransaction class in my business logic.

    My question - Is it ok to completely depend on the database's transaction and concurrency management systems alone? Are there are potential pitfalls involved with not using WCF's mechanisms for the same at the middle tier? Please let me know Gurus!

    Seeking enlightenment from my Gurus on the above!

    Novice Kid

    Friday, April 17, 2015 1:38 PM


  • Hi Novice,
     As per this case, I suggest you to implement transaction in WCF side also.
    Why ? Because you are using transaction management mechanisms in a large multiuser application.
    For example, when transaction is committed by SQL server commit transaction command and some exception may occur at client end after calling other service.Because the service functionality may be executed successfully but client is calling one another wcf service which may throw exception.This might be drawback without using transaction in WCF .
    So you can apply TransactionFlowOption in Attribute Interface Methods in WCF service.
    TransactionFlowOption.Allowed :
     This option specifies that client can call this WCF service in a transaction. It's not compulsory that the service needs to be called in a transaction. You can call without the transaction also
    For more information , refer the following link about enable transactions in WCF by step by step process :
    with regards,
    Monday, April 20, 2015 2:50 PM