开发者

BizTalk mapping - Scripting Functoid Object life cycle, when is it initialized and destructed

In a BizTalk map when you call a scripting functiod, is the object (the class you are calling) initialized at the time of the first call and kept in memory for the entire time the transformation is occurring? Or is is destroyed and initialized every time a new row is executed, or every time the script is called?

The reason I ask, is because I have had a debate about merits of caching a small look up table in memory, via a scripting functiod. I want to cache a dictionary the first time we do a look up on the first record, and use the same dictionary without database access for subseq开发者_StackOverflowuent looks ups.

Is this a naive approach? Would the dictionary be lost because the object will be re-initialized, or is it kept in memory until the end of the transformation? Does Microsoft have any guidance on this (I've not been able to find any)?


As long as it's a non-static class in an external component BizTalk will create a new instance for each time the map runs and "ordinary" caching as you describe would work.

This post and the posts it refers to discusses the problems and a few different solutions.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜