Using SSO as a Configuration Store in BizTalk Server 2006 by Todd Uhl
Many BizTalk solution designs require the need to store configuration type of data. This data is typically in the form of key/value pairs. There are several options for implementing a key/value lookup design. Developers often add a section to the BizTalk configuration file (BSTNTSvc.exe.config) to store this information, or link the BizTalk configuration file to an external configuration file. Another widely used design is to implement Enterprise Library’s Configuration module. The issue with these designs is that a typical production environment generally consists of multiple servers, requiring duplication of the configuration information on each machine. This becomes a maintenance and deployment headache. A more robust, but generally overlooked option is to leverage the SSO system as a configuration store.
What makes SSO a better option? For one thing, if the BizTalk environment is up and running, then SSO is available to the BizTalk servers. Additionally, all the servers in the environment leverage a central SSO system, so there is a single place for deployment and maintenance. Leveraging SSO also alleviates the need to recycle the hosts to pick up any new values that have been added to configuration files. The Key/Value pairs are stored under applications within SSO, so the single SSO system can support multiple solutions within BizTalk. The intent of this article is to make developers aware of leveraging SSO as a config value store, and to give a brief overview of how to use SSO in your designs. For more detailed information, and code samples, I would suggest looking at the “Scenarios for Business Solutions” found in the BizTalk 2006 SDK.
A common design when implementing SSO is to create a helper class that contains all the logic necessary to retrieve and cache data from the SSO system. This object should be designed as a Singleton object so that there can only be one instance of the object at any given time. This will insure that all parts of a solution making use of helper object are using the same values (i.e. – if a value in SSO is changed, it will be picked up during the next refresh of the singleton object and all parts of the solution will now use that new value).
Within the helper class, the Microsoft.BizTalk.Interop.SSOClient assembly needs to be referenced in order to interact with the SSO system. Additionally, an object will need to be created that inherits from the Microsoft.BizTalk.SSOClient.Interop.IPropertyBag interface. This object gets passed into the ISSOConfigStore.GetConfigInfo method to be filled, and is then used to retreive the desired values by typical Property Bag methods.
For getting your values stored into SSO, there are several options. One option is to use the command line along with an XML file that contains your application information. Getting the format of the XML file is not always easy however. An example of the XML file can be found in the %ProgramFiles%\Microsoft BizTalk Server 2006\SDK\Samples\SSO\Manage folder. The AffiliateApplication.xml file can be used as a baseline for creating your own files. Once the application has been created, you can use command line again to set the value of the parameters that are contained in the file. Type SSOManage /? into the command line to get more information on the using the command line to create your applications and set your values. Another option is to use the SSO Administration console that gets installed with BizTalk 2006. This will give you a GUI that allows you to enter the same information that would normally be contained in the XML file, as well as the ability to create and set your key/value pairs.
Hopefully this brief article has peaked your interest in the option of using SSO to maintain your solution’s configuration information. As mentioned previously, I would strongly suggest looking into the scenarios that get installed along with the BizTalk SDK as a reference for code examples.
About
Todd Uhl:
Todd Uhl is currently working as an independent consultant and has been primarily focused on BizTalk Server since 2000. Look for other postings on his blog – http://www.geekswithblogs.net/toddu
Additional information on using SSO with the SAP Adapter can be found here.
BizTalk Server 2006 Boot Camp Training in Atlanta
Dunn Training and Consulting is offering BizTalk 2006 Boot Camp Training in Atlanta, GA. The next class is scheduled for August 28th. Get more information or to sign up visit their web site.
Make sure you tell them you heard about them from BizTalkGurus.com!
SOA and BizTalk Process Conference
Mark your calendar for this years must attend event in the world of BizTalk!
The SOA and Business Process Conference is scheduled for October 3rd to 6th in Redmond. Get all the details here.
Free BizTalk 2006 Training CD
AppDev is offering a free 3 hour "Exploring BizTalk Server 2006" training CD.
Get the details on their site.
International customers just pay a shipping and handling charge.
In addition to the BizTalk 2006 CD, they have over 20 different CDs to pick from.
BizTalk Explorer Object Model Not Supported in 64 Bit Processes
I was reading the help guide the other day and came across this warning message.
"The BizTalk Explorer Object Model (Microsoft.BizTalk.ExplorerOM.dll) is only
supported if used from 32 bit processes. If you are building a solution for a 64 bit
system you should not use this library."
Got to love those little warning messages.
BizTalkGurus.com New Downloads
SQL 2005 XML Data in BizTalk Server 2006
This sample uses a simple stored procedure to extract out data as XML from SQL Server 2005. Using this approach, you can receive many different messages through one Biztalk Receive Location.
Comments or Suggestions?
I welcome comments, questions, and suggestions. After all, this newsletter is about delivering content you want to hear about! Feel free to contact me through the forum or via e-mail.
Until next time...
Stephen W. Thomas -
BizTalkGurus.com
The Bottom Line:
Use caution when checking your bag with the hotel bell men. I recently had my whole suitcase (worth $1800) just disappear. But at least I got to keep the claim ticket! |