Why class should be serializable in BizTalk

Home Page Forums BizTalk 2004 – BizTalk 2010 Why class should be serializable in BizTalk

Viewing 2 reply threads
  • Author
    Posts
    • #24604

      Please help me in this regards…

      why should a class should be Serializable…..

      As serialization is required only in case you are persisting state or passing data b/n network.

      Also if you answering this question could you send me the details on my mail id…..  [email protected]

       

      Regards,

       

      Ashwani Kumar

      [email protected]

       

    • #24614

      A .NET class used as a variable must be serializable for persistence. A .NET class used as a message must be serializable for persistence and for message passing.
      You can of course use non-serializable classes as variables in atomic scopes because these are not persisted.

      • #24625

        you can also use Static Classes for helper methods in case you dont want to serialize your classes.

        However the approach for using Non- Serialized classes in Atomic scope does the trick but many ppl dont recommend due to its performance issues.

        ([email protected])

    • #24626

      Basically biztalk is tightly coupled with SQL Server, meaning biztalk has many databases and BizTalk persists the context of your instance to SQL Server database many times. ALso whenever your instance is idle for certain time, biztalk saves the context into the database. There are different persistence points like (start of orchestration, end of orchestration, after send port etc).

      Hence, while saving the context into the database, everything (variable, message etc) is being saved to the database. Saving to the database needs serialization..

      As suggested above, there are alternatives of using some Atomic scope if you wish to use non-serializable object. No presistence occurs within atomic scope.

Viewing 2 reply threads
  • The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.