Orchestrations, Singleton .NET Class and Dispose.

Home Page Forums BizTalk 2004 – BizTalk 2010 Orchestrations, Singleton .NET Class and Dispose.

Viewing 1 reply thread
  • Author
    Posts
    • #16094

      In my Orchestratons, I have to get values from registry and if registry gets
      modified the Orchestration has to have updated values.

      I have a created a singleton class to handle this, as monitoring registry
      requires closing the handles when the program ends, disposing the objects, I
      have implemented the disposed pattern. But since the class is singleton, I cannot
      call Dispose method from Orchestration. From where and when I would call the Dispose.

      Does the class stay in memory all the time irrespective of whether there is activity for Orchestrations or not?

      And what happens when the BTSNTSvc.exe gets restarted, does the class gets deleted from the memory and reinitialized when the service starts.

      Can I use finalize() to dispose.

      Is there anyway I can monitor the class loading, unloading, getting disposed etc during Service Start, End or Orchestrations getting rehydrated or dehydrated

      Any ideas..

      Thanks

      Sujith Jagini

    • #16160

      No, I don’t think you can do what you want.

       

      The class will live in the process space of the BTSNTSvc.  You’ll need to restart the service to get the updated values.  Unless you use an instance class.

       

      Using Dispose is dangerous.  I think I read a blog post that says not to use that.  

       

      Maybe you could use the rules engine with a fact retriever.  Use it to check for updated values.  That’s the best I can think of.

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