locked
Biztalk atomic transaction scope and DTC RRS feed

  • Question

  • Hi,

     

    Thse questions are based on BTS 2010.

    1.)I am lead to believe that atomic transaction scope is for ACIDity on messages and variables that are visible within that scope and not for ACIDity on ADO.NET related operations. If thats true, is there a way i can implement ACIDity on ADO.NET?

    2.)I have a lot of orchestration variables and some of them are used only within a scope. I have been asked to move those variables as close to the scope where it is being used otherwise this would lead to performance issues. I am not clear on how the performance would be affectd here?

    3.)I have read that in an orchestration, a send shape always acts as a persistence point. But i as a developer might need that send shape to act as a persistence point except in some scenarios where is request and response. Why is this so?

    4.)Is there a way i can use LINQ to XML inside expression editor?XPATH seems to be cumbersome and defeats the purpose of LINQ.

     

    Thanks in advance.


    Please mark the response as answers if it solves your question or vote as helpful if you find it helpful. http://thoughtorientedarchitecture.blogspot.com/
    Tuesday, August 23, 2011 7:26 AM

Answers

  • Hi,

     

    1) There are a couple of reasons for using an atomic scope in an orchestration. The most important are: using non serializable code, prevent from too much persistence points and calling a serviced component that will run in the same transaction as the orchestration. So I think you can use ACIDity on ADO.NET from within an orchestration. Create a serviced .NET component that runs in the same transaction as the orchestration. From the component do the ADO.net calls. However you should also consider using the WCF adapters (WCF SQL adapter if your target database is SQL Server). Those adapters (especially the SQL version) come with advanced transaction support like composite transactions and ambient transactions. Not sure if these adapters are feasible in your situation as it depends on your requirements.

    2) I don't think there will be performance issues directly when you don't have the variables declared in the scope that uses them. It is good practice though to do this. As soon as the scope is ended the variables go out of scope and can be garbage collected. This saves resources so it is always a good idea to do this.

    3) I'm not sure what you mean. Please elaborate a little more.

    4). No, there is not. You use a language called xsharp in (expression shapes) in an orchestration. Compared to C# this language is limited. You can of course use linq to xml in custom .net components which you can call from expression shapes.

    Hope this is useful for you.

     

     


    HTH,

    Randal van Splunteren 2 x MVP BizTalk Server, MCTS BizTalk Server
    my blog

    Check out the PowerShell provider for BizTalk
    Please mark as answered if this answers your question.
    Tuesday, August 23, 2011 8:54 AM
    Moderator
  • A small addition:
    here is an article, "BizTalk: Compensation Model" which describes in details how Atomic transaction Scope works. That is not atomic in the SQL meaning, not ACID. It is slightly different.
    Leonid Ganeline [BizTalk MVP] BizTalk: Sample: Context Routing and Throttling with orchestration
    • Marked as answer by Haripraghash Wednesday, August 24, 2011 1:26 AM
    Tuesday, August 23, 2011 8:33 PM
    Moderator
  • Hi,

    Thse questions are based on BTS 2010.

    1.)I am lead to believe that atomic transaction scope is for ACIDity on messages and variables that are visible within that scope and not for ACIDity on ADO.NET related operations. If thats true, is there a way i can implement ACIDity on ADO.NET?

    [Answer]:The answer to your question is the blog BizTalk Atomic Transaction Rollback of Variables by Richard Seroter.

    2.)I have a lot of orchestration variables and some of them are used only within a scope. I have been asked to move those variables as close to the scope where it is being used otherwise this would lead to performance issues. I am not clear on how the performance would be affectd here?

    [Answer]:In some scenarios it might improve the performance as all these variables get serialized during persistence so it depend on the size of the variables and no of persistence points in your orchestration.

    3.)I have read that in an orchestration, a send shape always acts as a persistence point. But i as a developer might need that send shape to act as a persistence point except in some scenarios where is request and response. Why is this so?

    [Answer]: The answer to your question is the blog Persistence Points in Orchestration by Sarvana Kumar.

    4.)Is there a way i can use LINQ to XML inside expression editor?XPATH seems to be cumbersome and defeats the purpose of LINQ.

    [Answer]:The answer is no and explanation can be found in the Requirements and Limitations for Expressions

    Thanks in advance.


    Please mark the response as answers if it solves your question or vote as helpful if you find it helpful. http://thoughtorientedarchitecture.blogspot.com/


    Don't forget to mark the post as answer or vote as helpful if it does, Regards -Rohit Sharma (http://rohitbiztalk.blogspot.com)
    Tuesday, August 23, 2011 10:11 AM
    Moderator

All replies

  • Hi,

     

    1) There are a couple of reasons for using an atomic scope in an orchestration. The most important are: using non serializable code, prevent from too much persistence points and calling a serviced component that will run in the same transaction as the orchestration. So I think you can use ACIDity on ADO.NET from within an orchestration. Create a serviced .NET component that runs in the same transaction as the orchestration. From the component do the ADO.net calls. However you should also consider using the WCF adapters (WCF SQL adapter if your target database is SQL Server). Those adapters (especially the SQL version) come with advanced transaction support like composite transactions and ambient transactions. Not sure if these adapters are feasible in your situation as it depends on your requirements.

    2) I don't think there will be performance issues directly when you don't have the variables declared in the scope that uses them. It is good practice though to do this. As soon as the scope is ended the variables go out of scope and can be garbage collected. This saves resources so it is always a good idea to do this.

    3) I'm not sure what you mean. Please elaborate a little more.

    4). No, there is not. You use a language called xsharp in (expression shapes) in an orchestration. Compared to C# this language is limited. You can of course use linq to xml in custom .net components which you can call from expression shapes.

    Hope this is useful for you.

     

     


    HTH,

    Randal van Splunteren 2 x MVP BizTalk Server, MCTS BizTalk Server
    my blog

    Check out the PowerShell provider for BizTalk
    Please mark as answered if this answers your question.
    Tuesday, August 23, 2011 8:54 AM
    Moderator
  • Hi,

    Thse questions are based on BTS 2010.

    1.)I am lead to believe that atomic transaction scope is for ACIDity on messages and variables that are visible within that scope and not for ACIDity on ADO.NET related operations. If thats true, is there a way i can implement ACIDity on ADO.NET?

    [Answer]:The answer to your question is the blog BizTalk Atomic Transaction Rollback of Variables by Richard Seroter.

    2.)I have a lot of orchestration variables and some of them are used only within a scope. I have been asked to move those variables as close to the scope where it is being used otherwise this would lead to performance issues. I am not clear on how the performance would be affectd here?

    [Answer]:In some scenarios it might improve the performance as all these variables get serialized during persistence so it depend on the size of the variables and no of persistence points in your orchestration.

    3.)I have read that in an orchestration, a send shape always acts as a persistence point. But i as a developer might need that send shape to act as a persistence point except in some scenarios where is request and response. Why is this so?

    [Answer]: The answer to your question is the blog Persistence Points in Orchestration by Sarvana Kumar.

    4.)Is there a way i can use LINQ to XML inside expression editor?XPATH seems to be cumbersome and defeats the purpose of LINQ.

    [Answer]:The answer is no and explanation can be found in the Requirements and Limitations for Expressions

    Thanks in advance.


    Please mark the response as answers if it solves your question or vote as helpful if you find it helpful. http://thoughtorientedarchitecture.blogspot.com/


    Don't forget to mark the post as answer or vote as helpful if it does, Regards -Rohit Sharma (http://rohitbiztalk.blogspot.com)
    Tuesday, August 23, 2011 10:11 AM
    Moderator
  • A small addition:
    here is an article, "BizTalk: Compensation Model" which describes in details how Atomic transaction Scope works. That is not atomic in the SQL meaning, not ACID. It is slightly different.
    Leonid Ganeline [BizTalk MVP] BizTalk: Sample: Context Routing and Throttling with orchestration
    • Marked as answer by Haripraghash Wednesday, August 24, 2011 1:26 AM
    Tuesday, August 23, 2011 8:33 PM
    Moderator