Answered by:
Helper class called from map links get instantiated only once for a map or for every link that uses Helper class?

Question
-
Hi,
I am planning to pull some configuration data through helper class used inside map. Say from a xml file or database.
I need to know if it
gets instantiated for every links in the map that uses Helper class
OR
gets instantiated only once in the execution of the map?
Regards
Vivek
Friday, June 9, 2017 9:10 PM
Answers
-
Hi Vivek,
This has been discussed at length here, you will get lot of good ideas.
Rachit Sikroria (Microsoft Azure MVP)
- Marked as answer by Vivekanandh007 Wednesday, June 14, 2017 6:42 PM
Friday, June 9, 2017 10:41 PMModerator
All replies
-
Hi Vivek,
This has been discussed at length here, you will get lot of good ideas.
Rachit Sikroria (Microsoft Azure MVP)
- Marked as answer by Vivekanandh007 Wednesday, June 14, 2017 6:42 PM
Friday, June 9, 2017 10:41 PMModerator -
Helper classes are non-static per Transform execution...but you can make it work like static instances...
But you really shouldn't be worrying about that exactly. What problem are you trying to solve?
Sunday, June 11, 2017 9:10 PMModerator -
John
We have a map that may call helper class in many links for configuration values.
The configuration values are residing in database. I thought I would pull data based on map from database only once when helper gets initiated and then use the values from local variable xmldoc in other links of the map.
I want to eliminate DB calls or configuration on each map links, I need to make it one DB call.
When there are so many configuration hard code values to pull into map, how generally application are designed ?
I don't want to hard code them in map directly, that becomes hard to maintain.
Regards
Vivek
Wednesday, June 14, 2017 6:16 PM -
Please have a look at the BizTalk XRef Data pattern a feature of BizTalk
Basically there are a set of tables within BizTalk which allow you to setup the mappings for reference data between systems
http://geekswithblogs.net/michaelstephenson/archive/2006/12/24/101995.aspx
Also check the reference links in the comments
hth /Peter
Friday, June 16, 2017 6:21 AM