<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:blogChannel="http://backend.userland.com/blogChannelModule" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:pingback="http://madskills.com/public/xml/rss/module/pingback/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">
  <channel>
    <title>Saravana Kumar</title>
    <description>Digital Deposit</description>
    <link>http://blogs.digitaldeposit.net/SARAVANA/</link>
    <docs>http://www.rssboard.org/rss-specification</docs>
    <generator>BlogEngine.NET 1.4.5.0</generator>
    <language>en-GB</language>
    <blogChannel:blogRoll>http://blogs.digitaldeposit.net/SARAVANA/opml.axd</blogChannel:blogRoll>
    <blogChannel:blink>http://www.dotnetblogengine.net/syndication.axd</blogChannel:blink>
    <dc:creator>Saravana Kumar</dc:creator>
    <dc:title>Saravana Kumar</dc:title>
    <atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/SaravanaKumar" /><feedburner:info uri="saravanakumar" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><image><link>http://blogs.digitaldeposit.net/saravana</link><url>http://blogs.digitaldeposit.net/saravana/themes/Gluttony_SK_960/images/saravanakumar.png</url><title>Saravana Kumar - BizTalk Server MVP</title></image><feedburner:emailServiceId>SaravanaKumar</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><item>
      <title>Issue using in-memory SQL Express database with in Visual Studio</title>
      <description>&lt;p&gt;This post is for my own reference, just to avoid this in the future. It happened to&amp;#160; my twice already.&lt;/p&gt;  &lt;p&gt;I was trying to add a new in-memory databse (Add New Item ? SQL Server Database) within visual studio to quickly knock some prototype and was constantly greeted with this error message. &lt;/p&gt;  &lt;p&gt;&amp;quot;Failed to generate a user instance of SQL Server due to a failure in starting the process for the user instance&amp;quot;&lt;/p&gt;  &lt;p&gt;After a bit of digging and binging, the solution is to delete the SQL express folder completely founder under the user directory&lt;/p&gt;  &lt;p&gt;C:\Documents and Settings\&amp;lt;&amp;lt;your login&amp;gt;&amp;gt;\Local Settings\Application Data\Microsoft\Microsoft SQL Server Data\SQLEXPRESS&lt;/p&gt;  &lt;p&gt;Then, you may be greeted with Timeout error, but try again. It will be ok second time.&lt;/p&gt;  &lt;p&gt;Nandri&lt;/p&gt;  &lt;p&gt;Saravana&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/SaravanaKumar/~4/JLUz7MD5IbE" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/SaravanaKumar/~3/JLUz7MD5IbE/post.aspx</link>
      <author>saravana.kumar.nospam@nospam.biztalk247.co.uk (saravana)</author>
      <comments>http://blogs.digitaldeposit.net/SARAVANA/post/2010/01/18/Issue-using-in-memory-SQL-Express-database-with-in-Visual-Studio.aspx#comment</comments>
      <guid isPermaLink="false">http://blogs.digitaldeposit.net/SARAVANA/post.aspx?id=9833ecd3-d1e6-41f0-a1d6-f482d2f80842</guid>
      <pubDate>Mon, 18 Jan 2010 14:14:32 +0000</pubDate>
      <dc:publisher>saravana</dc:publisher>
      <pingback:server>http://blogs.digitaldeposit.net/SARAVANA/pingback.axd</pingback:server>
      <pingback:target>http://blogs.digitaldeposit.net/SARAVANA/post.aspx?id=9833ecd3-d1e6-41f0-a1d6-f482d2f80842</pingback:target>
      <slash:comments>1</slash:comments>
      <trackback:ping>http://blogs.digitaldeposit.net/SARAVANA/trackback.axd?id=9833ecd3-d1e6-41f0-a1d6-f482d2f80842</trackback:ping>
      <wfw:comment>http://blogs.digitaldeposit.net/SARAVANA/post/2010/01/18/Issue-using-in-memory-SQL-Express-database-with-in-Visual-Studio.aspx#comment</wfw:comment>
      <wfw:commentRss>http://blogs.digitaldeposit.net/SARAVANA/syndication.axd?post=9833ecd3-d1e6-41f0-a1d6-f482d2f80842</wfw:commentRss>
    <feedburner:origLink>http://blogs.digitaldeposit.net/SARAVANA/post.aspx?id=9833ecd3-d1e6-41f0-a1d6-f482d2f80842</feedburner:origLink></item>
    <item>
      <title>Linq to SQL strange error</title>
      <description>&lt;p&gt;Currently I'm using Linq to SQL in one of my internal projects. After adding a stored procedure to the designer, I started to see the following error &amp;quot;The custom tool 'MSLinqToSQLGenerator' failed. Unspecified error&amp;quot; and my LinqToSql auto-generated .cs file disappeared from the project. I tried various things like restarting VS (btw its VS 2008 with SP1), closing all the open source files, even going to the extend of deleting the complete .dbml and dbml.layout files etc. &lt;/p&gt;  &lt;p&gt;I received the same error, when I attempted to run the tool by right-clicking on the .dbml file and selecting &amp;quot;Run Custom Tool&amp;quot;, but this time, it tried to open the source file where I used the DataContext class.&lt;/p&gt;  &lt;p&gt;This is the solution that worked for me. I Simply excluded that file which used the DataContext class and executed the &amp;quot;Run Custom Tool&amp;quot; again, it worked flawlessly this time, then I included the file back again.&lt;/p&gt;  &lt;p&gt;HTH&lt;/p&gt;  &lt;p&gt;Saravana&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/SaravanaKumar/~4/3ZR9xbg5b5U" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/SaravanaKumar/~3/3ZR9xbg5b5U/post.aspx</link>
      <author>saravana.kumar.nospam@nospam.biztalk247.co.uk (saravana)</author>
      <comments>http://blogs.digitaldeposit.net/SARAVANA/post/2009/12/08/Linq-to-SQL-strange-error.aspx#comment</comments>
      <guid isPermaLink="false">http://blogs.digitaldeposit.net/SARAVANA/post.aspx?id=826e6f39-eb91-4311-97e9-cba7d4c252c9</guid>
      <pubDate>Tue, 08 Dec 2009 13:55:31 +0000</pubDate>
      <dc:publisher>saravana</dc:publisher>
      <pingback:server>http://blogs.digitaldeposit.net/SARAVANA/pingback.axd</pingback:server>
      <pingback:target>http://blogs.digitaldeposit.net/SARAVANA/post.aspx?id=826e6f39-eb91-4311-97e9-cba7d4c252c9</pingback:target>
      <slash:comments>6</slash:comments>
      <trackback:ping>http://blogs.digitaldeposit.net/SARAVANA/trackback.axd?id=826e6f39-eb91-4311-97e9-cba7d4c252c9</trackback:ping>
      <wfw:comment>http://blogs.digitaldeposit.net/SARAVANA/post/2009/12/08/Linq-to-SQL-strange-error.aspx#comment</wfw:comment>
      <wfw:commentRss>http://blogs.digitaldeposit.net/SARAVANA/syndication.axd?post=826e6f39-eb91-4311-97e9-cba7d4c252c9</wfw:commentRss>
    <feedburner:origLink>http://blogs.digitaldeposit.net/SARAVANA/post.aspx?id=826e6f39-eb91-4311-97e9-cba7d4c252c9</feedburner:origLink></item>
    <item>
      <title>Temporary Post Used For Theme Detection (96237376-9951-4a3f-b21c-7ff1fddd9270 - 3bfe001a-32de-4114-a6b4-4005b770f6d7)</title>
      <description>&lt;p&gt;This is a temporary post that was not deleted. Please delete this manually. (e0c04202-3def-4e9c-b80b-8c6d67c8d711 - 3bfe001a-32de-4114-a6b4-4005b770f6d7)&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/SaravanaKumar/~4/qMin-f2b_iY" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/SaravanaKumar/~3/qMin-f2b_iY/post.aspx</link>
      <author>saravana.kumar.nospam@nospam.biztalk247.co.uk (saravana)</author>
      <comments>http://blogs.digitaldeposit.net/SARAVANA/post/2009/11/26/Temporary-Post-Used-For-Theme-Detection-(96237376-9951-4a3f-b21c-7ff1fddd9270-3bfe001a-32de-4114-a6b4-4005b770f6d7).aspx#comment</comments>
      <guid isPermaLink="false">http://blogs.digitaldeposit.net/SARAVANA/post.aspx?id=c883d99c-0332-42c0-a765-4f1577e0c9e2</guid>
      <pubDate>Thu, 26 Nov 2009 16:30:24 +0000</pubDate>
      <dc:publisher>saravana</dc:publisher>
      <pingback:server>http://blogs.digitaldeposit.net/SARAVANA/pingback.axd</pingback:server>
      <pingback:target>http://blogs.digitaldeposit.net/SARAVANA/post.aspx?id=c883d99c-0332-42c0-a765-4f1577e0c9e2</pingback:target>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://blogs.digitaldeposit.net/SARAVANA/trackback.axd?id=c883d99c-0332-42c0-a765-4f1577e0c9e2</trackback:ping>
      <wfw:comment>http://blogs.digitaldeposit.net/SARAVANA/post/2009/11/26/Temporary-Post-Used-For-Theme-Detection-(96237376-9951-4a3f-b21c-7ff1fddd9270-3bfe001a-32de-4114-a6b4-4005b770f6d7).aspx#comment</wfw:comment>
      <wfw:commentRss>http://blogs.digitaldeposit.net/SARAVANA/syndication.axd?post=c883d99c-0332-42c0-a765-4f1577e0c9e2</wfw:commentRss>
    <feedburner:origLink>http://blogs.digitaldeposit.net/SARAVANA/post.aspx?id=c883d99c-0332-42c0-a765-4f1577e0c9e2</feedburner:origLink></item>
    <item>
      <title>SSO Configuration Application MMC Snap-In</title>
      <description>&lt;p&gt;For those of you who have used BizTalk long enough, its not a surprise : The Enterprise single sign on capabilities that comes as part of BizTalk server is used to store lot of confidential information in&amp;#160; a secured way, without SSO you can't setup a BizTalk environment. BizTalk Server internally uses SSO to store lots of its internal configurations like adapter data, configuration you put on send/receive ports etc, etc. &lt;/p&gt;  &lt;p&gt;Another less known factor (at least for beginners) is that, you can keep your own configuration data in SSO database (the things you normally keep in an app.config file).&amp;#160; In the past, its not a straight forward approach due to lack of tooling. People like &lt;a href="http://seroter.wordpress.com" target="_blank"&gt;Richard Seroter&lt;/a&gt; came with &lt;a href="http://seroter.wordpress.com/2008/02/28/sso-config-data-store-tool-biztalkwcf-scenario-source-code-available/" target="_blank"&gt;custom tools&lt;/a&gt; to tackle this issue, which helped.&lt;/p&gt;  &lt;p&gt;Recently Microsoft released a MMC snap-in to tackle this exact issue. You can download the full package from &lt;a href="http://www.microsoft.com/downloads/details.aspx?displaylang=en&amp;amp;FamilyID=94e07de1-1d33-4245-b430-9216979cd587" target="_blank"&gt;here&lt;/a&gt;. The installation comes with&lt;/p&gt;  &lt;p&gt;1. MMC Snap-in to manage a SSO application (Create, import, export, delete etc), Manage your custom key/value pair data.&lt;/p&gt;  &lt;p&gt;2. It comes with .cs helper file with a static method to read the data,&lt;/p&gt;  &lt;p&gt;3. MSBuild task, which helps to import your custom application during deployment (this is supper cool).&lt;/p&gt;  &lt;p&gt;Let just see a &amp;quot;Hello World&amp;quot; walk through example:&lt;/p&gt;  &lt;p&gt;1. Download and install the MMC snap in from here&lt;/p&gt;  &lt;p&gt;2. Open &amp;quot;SSO Application Configuration.msc&amp;quot; mmc snap-in&lt;/p&gt;  &lt;p&gt;3. Right-Click on the top node &amp;quot;&amp;lt;your company name&amp;gt; SSO Application Configuration&amp;quot; and select &amp;quot;Add Application&amp;quot;, give the name &amp;quot;HelloWorld&amp;quot;.&lt;/p&gt;  &lt;p&gt;4. Right-Click on the &amp;quot;HelloWorld&amp;quot; node, and select &amp;quot;Add Key Value Pair&amp;quot;, provide the values Key=&amp;quot;LoggingEnabled&amp;quot;, Value = &amp;quot;True&amp;quot;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.digitaldeposit.net/SARAVANA/image.axd?picture=WindowsLiveWriter/SSOConfigurationApplicationMMCSnapIn/1ED31A21/image.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.digitaldeposit.net/SARAVANA/image.axd?picture=WindowsLiveWriter/SSOConfigurationApplicationMMCSnapIn/29AFFB69/image_thumb.png" width="406" height="224" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;5. Create a console application, add reference to the dll &amp;quot;&lt;em&gt;C:\Program Files\Common Files\Enterprise Single Sign-On\Microsoft.BizTalk.Interop.SSOClient.dll&lt;/em&gt;&amp;quot;, include the &amp;quot;SSOClientHelper.cs&amp;quot; helper file (part of the download). &lt;/p&gt;  &lt;p&gt;6. Now you can access the key data as shown below&lt;/p&gt;  &lt;p&gt;&lt;font color="#804000"&gt;Console.WriteLine(SSOClientHelper.Read(&amp;quot;HelloWorld&amp;quot;, &amp;quot;LoggingEnabled&amp;quot;));&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;MSBuild Task:&lt;/p&gt;  &lt;p&gt;The mmc snap in allows you to export the SSO application in an encrypted format. You can later import it either using the mmc snap-in, or you can bundle it as part of msbuild task (if in case you already got your deployment configured using msbuild) as shown below&lt;/p&gt;  &lt;p&gt;&amp;lt;Target Name=&amp;quot;ImportSSOApp&amp;quot;&amp;gt;   &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;ImportSSOConfigurationApplicationTask EncryptionKey=&amp;quot;test&amp;quot; EncryptedFile=&amp;quot;C:\Users\Administrator\Documents\SSO App Export\TestApp.sso&amp;quot; /&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Message Text=&amp;quot;Imported SSO Application&amp;quot; /&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/Target&amp;gt;&lt;/p&gt;  &lt;p&gt;Nandri!&lt;/p&gt;  &lt;p&gt;Saravana&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/SaravanaKumar/~4/NcTN14w0Ksk" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/SaravanaKumar/~3/NcTN14w0Ksk/post.aspx</link>
      <author>saravana.kumar.nospam@nospam.biztalk247.co.uk (saravana)</author>
      <comments>http://blogs.digitaldeposit.net/SARAVANA/post/2009/11/16/SSO-Configuration-Application-MMC-Snap-In.aspx#comment</comments>
      <guid isPermaLink="false">http://blogs.digitaldeposit.net/SARAVANA/post.aspx?id=e81d6bd8-9e39-49c7-adb5-08e335adbcf7</guid>
      <pubDate>Mon, 16 Nov 2009 05:18:56 +0000</pubDate>
      <dc:publisher>saravana</dc:publisher>
      <pingback:server>http://blogs.digitaldeposit.net/SARAVANA/pingback.axd</pingback:server>
      <pingback:target>http://blogs.digitaldeposit.net/SARAVANA/post.aspx?id=e81d6bd8-9e39-49c7-adb5-08e335adbcf7</pingback:target>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://blogs.digitaldeposit.net/SARAVANA/trackback.axd?id=e81d6bd8-9e39-49c7-adb5-08e335adbcf7</trackback:ping>
      <wfw:comment>http://blogs.digitaldeposit.net/SARAVANA/post/2009/11/16/SSO-Configuration-Application-MMC-Snap-In.aspx#comment</wfw:comment>
      <wfw:commentRss>http://blogs.digitaldeposit.net/SARAVANA/syndication.axd?post=e81d6bd8-9e39-49c7-adb5-08e335adbcf7</wfw:commentRss>
    <feedburner:origLink>http://blogs.digitaldeposit.net/SARAVANA/post.aspx?id=e81d6bd8-9e39-49c7-adb5-08e335adbcf7</feedburner:origLink></item>
    <item>
      <title>Checking Live Writer after blog server crash</title>
      <description>&lt;p&gt;Life is not easy being a part time web administrator!! :-)&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/SaravanaKumar/~4/L0EbUHIOagg" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/SaravanaKumar/~3/L0EbUHIOagg/post.aspx</link>
      <author>saravana.kumar.nospam@nospam.biztalk247.co.uk (saravana)</author>
      <comments>http://blogs.digitaldeposit.net/SARAVANA/post/2009/10/30/Checking-Live-Writer-after-blog-server-crash.aspx#comment</comments>
      <guid isPermaLink="false">http://blogs.digitaldeposit.net/SARAVANA/post.aspx?id=1830009b-3da1-4297-901b-c4237ae52794</guid>
      <pubDate>Fri, 30 Oct 2009 10:33:20 +0000</pubDate>
      <dc:publisher>saravana</dc:publisher>
      <pingback:server>http://blogs.digitaldeposit.net/SARAVANA/pingback.axd</pingback:server>
      <pingback:target>http://blogs.digitaldeposit.net/SARAVANA/post.aspx?id=1830009b-3da1-4297-901b-c4237ae52794</pingback:target>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://blogs.digitaldeposit.net/SARAVANA/trackback.axd?id=1830009b-3da1-4297-901b-c4237ae52794</trackback:ping>
      <wfw:comment>http://blogs.digitaldeposit.net/SARAVANA/post/2009/10/30/Checking-Live-Writer-after-blog-server-crash.aspx#comment</wfw:comment>
      <wfw:commentRss>http://blogs.digitaldeposit.net/SARAVANA/syndication.axd?post=1830009b-3da1-4297-901b-c4237ae52794</wfw:commentRss>
    <feedburner:origLink>http://blogs.digitaldeposit.net/SARAVANA/post.aspx?id=1830009b-3da1-4297-901b-c4237ae52794</feedburner:origLink></item>
    <item>
      <title>BAM - Production environment management</title>
      <description>&lt;p&gt;
Reposting after server crash!!
&lt;/p&gt;
&lt;p&gt;
&lt;u&gt;Scenario:&lt;/u&gt; In this article we are not going to discuss about how to utilize BAM for your BizTalk applications. I&amp;#39;ve made the assumption; you created few BAM activities and utilized them inside your BizTalk applications and the system is now running on your productions servers. In my experience, majority of the clients don&amp;#39;t take advantage of BAM, when they do they just stick to the basics of creating few BAM activities and utilizing them in their applications. So this article is focused only on this basis and we are going to ignore all the fancy BAM stuff like BAM Views, Alerts, Notifications, real-time data etc.
&lt;/p&gt;
&lt;p&gt;
&lt;u&gt;Production Configuration:&lt;/u&gt;
&lt;/p&gt;
&lt;p&gt;
At the very high level your production BAM configuration should like the one shown below
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp;&lt;a href="http://blogs.digitaldeposit.net/SARAVANA/image.axd?picture=WindowsLiveWriter/0d817d94d113/181B99C1/image.png"&gt;&lt;img style="display: inline; border: 0px" src="http://blogs.digitaldeposit.net/SARAVANA/image.axd?picture=WindowsLiveWriter/0d817d94d113/0566A00A/image_thumb.png" border="0" alt="image" title="image" width="547" height="277" /&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
&lt;u&gt;&lt;strong&gt;Step 1: Make sure you deploy the BAM activities:&lt;/strong&gt;&lt;/u&gt;
&lt;/p&gt;
&lt;p&gt;
This one might look silly :-) but it&amp;#39;s possible you might have developed your solution taking advantage of BAM and not deployed BAM activities in your production environment. BAM failures are not treated very seriously by the BizTalk runtime. For example: Your orchestration might have BAM code embedded inside, but you haven&amp;#39;t deployed the corresponding BAM activities. In this case the orchestrations will complete successfully without getting suspended but there will be lot of events in the event viewer notifying the BAM failures and also records will start accumulate in the &lt;em&gt;TDDS_FailedTrackingData&lt;/em&gt; table in the database. Over a period of time this table will grow substantially, resulting in an unhealthy database and its not nice to see lot of failure events in your event viewer, which will interfere with analysing the real issues.
&lt;/p&gt;
&lt;p&gt;
&lt;u&gt;&lt;strong&gt;Step 2: Make sure TDDS sub-service is running.&lt;/strong&gt;&lt;/u&gt;
&lt;/p&gt;
&lt;p&gt;
When you configure a BizTalk host with the option &amp;quot;&lt;em&gt;Allow Host Tracking&lt;/em&gt;&amp;quot; to true and created a host instance for that host, then you have created a TDDS sub-service inside that host instance automatically. 
&lt;/p&gt;
&lt;p&gt;
The important step is to make sure there is at least one BizTalk Host/Host Instance configured to run &amp;quot;&lt;em&gt;Tracking Data Decode Service (TDDS)&lt;/em&gt;&amp;quot; in your environment. When you utilize BAM inside your BizTalk applications (inside your Orchestrations, Pipelines etc) BizTalk runtime will utilize one of the asynchronous event stream to write BAM data for performance reasons. When an asynchronous event stream is used, the BAM data will be first written to the BizTalk message box database and its the job of the TDDS service to move the BAM data from BizTalk message box database to &lt;em&gt;BAMPrimaryImport&lt;/em&gt; database. If you don&amp;#39;t run the TDDS service the data will start accumulating in the message box database and over a period of time will result in a bloated unhealthy message box database. For more info about Tracking host read this article &lt;a href="http://msdn.microsoft.com/en-us/library/ee308950(BTS.10).aspx"&gt;http://msdn.microsoft.com/en-us/library/ee308950(BTS.10).aspx&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;u&gt;&lt;strong&gt;Step 3: Setup your active window for the BAM data:&lt;/strong&gt;&lt;/u&gt;
&lt;/p&gt;
&lt;p&gt;
Based on your business needs, it will be critical to keep the historical BAM data for certain period.&amp;nbsp; The default setting by standard BizTalk installation is to keep the data for 6 months. If you are capturing lot of BAM data, you might need to reduce this value to days, weeks or months. You can change the value by using the &lt;em&gt;bm.exe&lt;/em&gt; tool.
&lt;/p&gt;
&lt;p&gt;
You can see the existing value by executing the following command
&lt;/p&gt;
&lt;p&gt;
&lt;font color="#ff0000"&gt;&lt;em&gt;bm get-activitywindow ?Activity:your_activity_name&lt;/em&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
You can set the active window to desired value by executing the following command
&lt;/p&gt;
&lt;p&gt;
&lt;font color="#ff0000"&gt;&lt;em&gt;bm set-activitywindow ? Activity:your_activity_name ?TimeLength:1 ?TimeUnit:Day&lt;/em&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;u&gt;&lt;strong&gt;Step 4: Make sure BAM_DM_&amp;lt;&amp;lt;activityname&amp;gt;&amp;gt; SSIS packages are configured to run&lt;/strong&gt;&lt;/u&gt;
&lt;/p&gt;
&lt;p&gt;
One of the biggest advantages of BAM is it creates the database infrastructure for you to capture business data. You don&amp;#39;t need to manually provision the database tables and views; it&amp;#39;s automatically created when you deploy the BAM activities using the management tool bm.exe. For every activity deployed there will be 5 corresponding database tables created in the &lt;em&gt;BAMPrimaryImport&lt;/em&gt; database with the postfix &lt;em&gt;_Active, _ActiveRelationships, _Completed, _CompletedRelationships and _Continuations&lt;/em&gt; (few SQL views will created to work with these tables and corresponding &lt;em&gt;BAM_DM_&amp;lt;&amp;lt;activity name&amp;gt;&amp;gt;&lt;/em&gt; SSIS package will be created). 
&lt;/p&gt;
&lt;p&gt;
The main reason for this provisioning is to improve the read/write speed while accessing the BAM data. The number of records in the _&lt;em&gt;Active &lt;/em&gt;table will be less; it will contain only in-flight instance data, once the instance complete processing the data will be moved to _&lt;em&gt;Completed&lt;/em&gt; tables. 
&lt;/p&gt;
&lt;p&gt;
This active/completed partition is good to certain extend, until the number of records in your completed tables started to grow, that&amp;#39;s where &lt;em&gt;BAM_DM_&amp;lt;&amp;lt;activity names&amp;gt;&amp;gt;&lt;/em&gt; SSIS packages comes into picture. This SSIS packages are mainly responsible for 2 tasks:
&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;Taking the database table provisioning to the next level, in order to improve read/write access speed, and &lt;/li&gt;
	&lt;li&gt;Removing the old data from the &lt;em&gt;BAMPrimaryImport&lt;/em&gt; database. It can either be moved to &lt;em&gt;BAMArchive&lt;/em&gt; database or purged as shown in the picture (beginning of the article). &lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
Whenever you run this SSIS package additional tables are created in &lt;em&gt;BAMPrimaryImport&lt;/em&gt; database post fixed by a GUID and old data is removed based on the active window configuration.
&lt;/p&gt;
&lt;p&gt;
The SSIS packages for your BAM activities are created when you deploy your activities, but they are &lt;font color="#ff0000"&gt;NOT configured automatically&lt;/font&gt; in your environment. In your production environment it&amp;#39;s critical to create a SQL job to run the SSIS packages in a periodic basis (every day or week based on your BAM data volume).
&lt;/p&gt;
&lt;p&gt;
&lt;u&gt;NOTE: &lt;/u&gt;If you have installed your BAM databases on a named SQL instance, then you won&amp;#39;t see the &lt;em&gt;BAM_DM_&lt;/em&gt; packages automatically when you connect to Integration services. See the topic &amp;quot;Where are my BAM_DM_ &amp;lt;&amp;lt;BAM Activity Name&amp;gt;&amp;gt; packages?&amp;quot; topic in the end of the article for the solution.
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;&lt;u&gt;Step 5: Whether to archive it or purge it?&lt;/u&gt;&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;&lt;u&gt;Historical Data:&lt;/u&gt;&lt;/strong&gt; 
&lt;/p&gt;
&lt;p&gt;
Historical Data in BAM falls under 2 categories. 
&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;Based on the active window settings the data will be kept in &lt;em&gt;BAMPrimaryImport&lt;/em&gt; database for that period. &lt;u&gt;Example:&lt;/u&gt; If your active window is set to 5 days, then 5 days BAM data will be held in various activity tables (partitioned with multiple GUID?s) within &lt;em&gt;BAMPrimaryImport&lt;/em&gt; database. &lt;/li&gt;
	&lt;li&gt;Any data that&amp;#39;s older than the active window will be held in the &lt;em&gt;BAMArchive&lt;/em&gt; database until its cleared manually. &lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
It will be a business decision to keep the historical data for governance purpose.&amp;nbsp; Until recently, before Microsoft issued the hot fix 971984 (&lt;a href="http://support.microsoft.com/kb/971984"&gt;http://support.microsoft.com/kb/971984&lt;/a&gt; ) it was not possible to purge the data directly from &lt;em&gt;BAMPrimaryImport&lt;/em&gt; database in BizTalk Server 2006. You always need to move the old historical data to &lt;em&gt;BAMArchive&lt;/em&gt; database and then purge it manually (see the script in the bottom of the article for doing it).
&lt;/p&gt;
&lt;p&gt;
With the hot fix (its available by default on BizTalk 2009) you can configure whether or not the data goes into &lt;em&gt;BAMArchive&lt;/em&gt; database by using the bm.exe tool. 
&lt;/p&gt;
&lt;p&gt;
&lt;em&gt;&lt;font color="#ff0000"&gt;bm set-archive ?Activity:your_activity_name ?shouldArchive:true|false&lt;/font&gt;&lt;/em&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;&lt;u&gt;Where are my BAM_DM_ &amp;lt;&amp;lt;BAM Activity Name&amp;gt;&amp;gt; packages?&lt;/u&gt;&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
If you have installed BAM databases on a named SQL instance and try to connect to Integration Services and expand the MSDB node, you&amp;#39;ll see the following error message.
&lt;/p&gt;
&lt;p&gt;
&lt;em&gt;&lt;font color="#ff0000"&gt;The SQL server specified in SSIS service configuration is not present or is not available. This might occur when there is no default instance of SQL Server on the computer. For more information, see the topic &amp;quot;Configuring the Integration Services Service&amp;quot; in Server 2005 Books Online.&lt;/font&gt;&lt;/em&gt;
&lt;/p&gt;
&lt;p&gt;
As noted in the error message the solution is available under &lt;a href="http://msdn.microsoft.com/en-us/library/ms137789.aspx" target="_blank"&gt;Configuring the Integration Services&lt;/a&gt; article. You need to open the &lt;em&gt;MsDtsSrvr.ini.xml&lt;/em&gt; file located under the folder %ProgramFiles%\Microsoft SQL Server\100\DTS\Binn (90 instead of 100 if you are using SQL 2005) and put the correct server name\instance name inside the &lt;em&gt;&amp;lt;ServerName&amp;gt;&lt;/em&gt; element. 
&lt;/p&gt;
&lt;p&gt;
&lt;font color="#ff8000"&gt;You need to &lt;strong&gt;restart&lt;/strong&gt; the SQL Integration Service after making this change.&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;&lt;u&gt;BAMArchive Purge Script:&lt;/u&gt;&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
There is no clear procedures documented in dealing with the data present in the &lt;em&gt;BAMArchive&lt;/em&gt; database. Over a period of time &lt;em&gt;BAMArchive&lt;/em&gt; database will also grow to substantial size and it will be required to truncate the data. Here is the script I use to truncate the &lt;em&gt;BAMArchive&lt;/em&gt; database, please note &lt;strong&gt;&lt;font color="#ff0000"&gt;this will wipe out all the data&lt;/font&gt;&lt;/strong&gt; present in the &lt;em&gt;BAMArchive&lt;/em&gt; database (use it at your own risk), but you will still have the historical data based on your active window configuration in the &lt;em&gt;BAMPrimaryImport &lt;/em&gt;database.
&lt;/p&gt;
&lt;p&gt;
&lt;font color="#ff0000"&gt;&lt;em&gt;truncate table bam_&amp;lt;&amp;lt;&lt;strong&gt;your_bam_activityname_1&lt;/strong&gt;&amp;gt;&amp;gt;_Instances &lt;br /&gt;
truncate table bam_&amp;lt;&amp;lt;&lt;strong&gt;your_bam_activityname_1&lt;/strong&gt;&amp;gt;&amp;gt;_Relationships &lt;/em&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font color="#ff0000"&gt;&lt;em&gt;truncate table bam_&amp;lt;&amp;lt;&lt;strong&gt;your_bam_activityname_2&lt;/strong&gt;&amp;gt;&amp;gt;_Instances &lt;br /&gt;
truncate table bam_&amp;lt;&amp;lt;&lt;strong&gt;your_bam_activityname_2&lt;/strong&gt;&amp;gt;&amp;gt;_Relationships &lt;/em&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font color="#ff0000"&gt;&lt;em&gt;&lt;strong&gt;&amp;lt;&amp;lt;repeate the truncate table steps for all of your bam activities&amp;gt;&amp;gt;&lt;/strong&gt; &lt;/em&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font color="#ff0000"&gt;&lt;em&gt;Declare @SqlQuery nvarchar(4000) &lt;br /&gt;
Declare @num int &lt;/em&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font color="#ff0000"&gt;&lt;em&gt;Set @num = (Select Count([Name]) From sys.tables &lt;br /&gt;
Where [Name] like &amp;#39;%bam_%Instances_200%-%-%&amp;#39; Or &lt;br /&gt;
[Name] like &amp;#39;%bam_%Relationships_200%-%-%&amp;#39;) &lt;/em&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font color="#ff0000"&gt;&lt;em&gt;-- Print @Num &lt;br /&gt;
Declare @i int &lt;br /&gt;
Set @i = 0 &lt;br /&gt;
While @Num &amp;gt; @i &lt;br /&gt;
Begin &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Set @i = @i + 1 &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Set @SqlQuery = (Select Top 1 &amp;#39;Drop Table [&amp;#39; + [Name] + &amp;#39;]&amp;#39; From sys.tables &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Where [Name] like &amp;#39;%bam_%Instances_200%-%-%&amp;#39; Or &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Name] like &amp;#39;%bam_%Relationships_200%-%-%&amp;#39;) &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Execute(@SqlQuery) &lt;br /&gt;
End&lt;/em&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
Nandri!
&lt;/p&gt;
&lt;p&gt;
Saravana
&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/SaravanaKumar/~4/oOxzJfSBP2Y" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/SaravanaKumar/~3/oOxzJfSBP2Y/post.aspx</link>
      <author>saravana.kumar.nospam@nospam.biztalk247.co.uk (saravana)</author>
      <comments>http://blogs.digitaldeposit.net/SARAVANA/post/2009/10/08/BAM-Production-environment-management.aspx#comment</comments>
      <guid isPermaLink="false">http://blogs.digitaldeposit.net/SARAVANA/post.aspx?id=840a5f2d-ceb0-4314-9995-4475dd929167</guid>
      <pubDate>Thu, 08 Oct 2009 10:36:00 +0000</pubDate>
      <category>BizTalk 2006</category>
      <category>BizTalk 2006 R2</category>
      <category>BizTalk 2009</category>
      <dc:publisher>saravana</dc:publisher>
      <pingback:server>http://blogs.digitaldeposit.net/SARAVANA/pingback.axd</pingback:server>
      <pingback:target>http://blogs.digitaldeposit.net/SARAVANA/post.aspx?id=840a5f2d-ceb0-4314-9995-4475dd929167</pingback:target>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://blogs.digitaldeposit.net/SARAVANA/trackback.axd?id=840a5f2d-ceb0-4314-9995-4475dd929167</trackback:ping>
      <wfw:comment>http://blogs.digitaldeposit.net/SARAVANA/post/2009/10/08/BAM-Production-environment-management.aspx#comment</wfw:comment>
      <wfw:commentRss>http://blogs.digitaldeposit.net/SARAVANA/syndication.axd?post=840a5f2d-ceb0-4314-9995-4475dd929167</wfw:commentRss>
    <feedburner:origLink>http://blogs.digitaldeposit.net/SARAVANA/post.aspx?id=840a5f2d-ceb0-4314-9995-4475dd929167</feedburner:origLink></item>
    <item>
      <title>BizTalk Videos and Posters</title>
      <description>&lt;p&gt;Microsoft web world is doing this for a very long time now, publishing short videos (&amp;quot;How Do I ?&amp;quot;) that will help users to kick start the concept quickly rather than going through tons of articles. BizTalk has entered this arena recently (relatively!!). Here is the URL for &amp;quot;BizTalk How do I?&amp;quot; video &lt;a title="http://msdn.microsoft.com/en-us/biztalk/dd849956.aspx" href="http://msdn.microsoft.com/en-us/biztalk/dd849956.aspx"&gt;http://msdn.microsoft.com/en-us/biztalk/dd849956.aspx&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;A picture is worth 1000 words, most of us know BizTalk team is been publishing posters that explains specific part of the product architecture in detail. There are lot of updates and new posters from the team. You can grab it from the following URL?s:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/dd450982(BTS.10).aspx" target="_blank"&gt;BizTalk Server 2009 Posters&lt;/a&gt;    &lt;br /&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/dd431686(BTS.10).aspx" target="_blank"&gt;BizTalk Server 2006 R2 Posters&lt;/a&gt;    &lt;br /&gt;&lt;a href="http://msdn.microsoft.com/en-us/biztalk/dd807494.aspx" target="_blank"&gt;BizTalk Server 2009 Posters on MSDN&lt;/a&gt;    &lt;br /&gt;&lt;a href="http://www.microsoft.com/biztalk/en/us/technical-posters.aspx" target="_blank"&gt;BizTalk Server Posters on Microsoft.com&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Don't forget, you can also get to the posters easily via biztalk247.com link &lt;a title="http://www.biztalk247.com/posters.aspx" href="http://www.biztalk247.com/posters.aspx"&gt;http://www.biztalk247.com/posters.aspx&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Nandri!&lt;/p&gt;  &lt;p&gt;Saravana &lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/SaravanaKumar/~4/EL0PI4OzCEo" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/SaravanaKumar/~3/EL0PI4OzCEo/post.aspx</link>
      <author>saravana.kumar.nospam@nospam.biztalk247.co.uk (saravana)</author>
      <comments>http://blogs.digitaldeposit.net/SARAVANA/post/2009/10/01/BizTalk-Videos-and-Posters.aspx#comment</comments>
      <guid isPermaLink="false">http://blogs.digitaldeposit.net/SARAVANA/post.aspx?id=d8b5add8-ba7b-449d-bf25-b9656c4f3caf</guid>
      <pubDate>Thu, 01 Oct 2009 07:40:48 +0000</pubDate>
      <dc:publisher>saravana</dc:publisher>
      <pingback:server>http://blogs.digitaldeposit.net/SARAVANA/pingback.axd</pingback:server>
      <pingback:target>http://blogs.digitaldeposit.net/SARAVANA/post.aspx?id=d8b5add8-ba7b-449d-bf25-b9656c4f3caf</pingback:target>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://blogs.digitaldeposit.net/SARAVANA/trackback.axd?id=d8b5add8-ba7b-449d-bf25-b9656c4f3caf</trackback:ping>
      <wfw:comment>http://blogs.digitaldeposit.net/SARAVANA/post/2009/10/01/BizTalk-Videos-and-Posters.aspx#comment</wfw:comment>
      <wfw:commentRss>http://blogs.digitaldeposit.net/SARAVANA/syndication.axd?post=d8b5add8-ba7b-449d-bf25-b9656c4f3caf</wfw:commentRss>
    <feedburner:origLink>http://blogs.digitaldeposit.net/SARAVANA/post.aspx?id=d8b5add8-ba7b-449d-bf25-b9656c4f3caf</feedburner:origLink></item>
    <item>
      <title>Marriage between BizTalk Server 2006 and IBM WebSphere Message Broker</title>
      <description>&lt;p&gt;
&lt;strong&gt;&lt;u&gt;Introduction:&lt;/u&gt;&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
In my current client, this is the situation: There are two separate teams involved in two different projects. One utilizing BizTalk Server 2006 building BPM solution and the other utilizing IBM WebSphere Message Broker building an even management system. The day has arrived, where we need to make these two systems talk to each other via MQ. Looking at very high level picture wearing an architecture hat this is what you would have drawn on a white board: 
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blogs.digitaldeposit.net/saravana/image.axd?picture=WindowsLiveWriter/MarriagebetweenBizTalkServer2006andIBMWe/62F9F481/clip_image002.jpg"&gt;&lt;img style="display: inline; border-width: 0px" src="/saravana/image.axd?picture=WindowsLiveWriter/MarriagebetweenBizTalkServer2006andIBMWe/73FE2264/clip_image002_thumb.jpg" border="0" alt="clip_image002" title="clip_image002" width="485" height="163" /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
Easypeacy, BizTalk got an MQ adapter, so it can put messages into MQ and WMB will pickup the messages from there and both the system can talk to each other seamlessly. But it just turns out; it&amp;#39;s not as simple as that. In order for WMB to pickup the messages that come into MQ, the messages must be PUBLISHED rather than point-to-point PUT and while publishing certain TOPICS should be added. WMB in turn will do all its routing to the subscribers based on the topics that&amp;#39;s present in the message.
&lt;/p&gt;
&lt;p&gt;
It&amp;#39;s always tricky if you don&amp;#39;t know the semantics of glossary terms used by different teams. After some research and with the help of the Utility tool RFHUTIL.exe provided by IBM to write messages into MQ, it turns out the difference between PUBLISH and PUT is just the addition of some extra MQ specific headers. The format of the header is called MQRFH2; one of the segments in the header will contain the PSC commands required for publishing. Relevant TOPICS as name value pair can be added as part of the PSC command.
&lt;/p&gt;
&lt;p&gt;
All these things will make more sense if we see some pictures. I utilized RFHUTIL to place couple of messages into MQ. When you browse the messages in MQ using MQ explorer, it will look like this:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blogs.digitaldeposit.net/saravana/image.axd?picture=WindowsLiveWriter/MarriagebetweenBizTalkServer2006andIBMWe/2EE5552E/clip_image004.jpg"&gt;&lt;img style="display: inline; border-width: 0px" src="/saravana/image.axd?picture=WindowsLiveWriter/MarriagebetweenBizTalkServer2006andIBMWe/0DF1E287/clip_image004_thumb.jpg" border="0" alt="clip_image004" title="clip_image004" width="558" height="110" /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
You can spot the difference between the messages, the PUBLSIHED message format is MQRFH2 and the message data now contains some additional RFH information in the beginning.
&lt;/p&gt;
&lt;p&gt;
When you double click and open the message, the first one (regular PUT) will look like this
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blogs.digitaldeposit.net/saravana/image.axd?picture=WindowsLiveWriter/MarriagebetweenBizTalkServer2006andIBMWe/580CED6C/clip_image006.jpg"&gt;&lt;img style="display: inline; border-width: 0px" src="/saravana/image.axd?picture=WindowsLiveWriter/MarriagebetweenBizTalkServer2006andIBMWe/2B83BD86/clip_image006_thumb.jpg" border="0" alt="clip_image006" title="clip_image006" width="244" height="157" /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
And the second one (PUBLISH) will look like the one displayed below with additional MQRFH2 properties containing PSC information.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blogs.digitaldeposit.net/saravana/image.axd?picture=WindowsLiveWriter/MarriagebetweenBizTalkServer2006andIBMWe/6EEBBEE8/clip_image008.jpg"&gt;&lt;img style="display: inline; border-width: 0px" src="/saravana/image.axd?picture=WindowsLiveWriter/MarriagebetweenBizTalkServer2006andIBMWe/4981CB7A/clip_image008_thumb.jpg" border="0" alt="clip_image008" title="clip_image008" width="244" height="115" /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
Also, if you look at the data you can see the additional information at the beginning of the message as shown below:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blogs.digitaldeposit.net/saravana/image.axd?picture=WindowsLiveWriter/MarriagebetweenBizTalkServer2006andIBMWe/08DF7F0B/clip_image010.jpg"&gt;&lt;img style="display: inline; border-width: 0px" src="/saravana/image.axd?picture=WindowsLiveWriter/MarriagebetweenBizTalkServer2006andIBMWe/00E7DCA9/clip_image010_thumb.jpg" border="0" alt="clip_image010" title="clip_image010" width="149" height="207" /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
At this stage at least you know, what you are working on, what&amp;#39;s your target goal is and now you need to concentrate on how you are going to manage it from BizTalk Server 2006.
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;&lt;u&gt;Understanding BizTalk Adapters for MQ:&lt;/u&gt;&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
When it comes to BizTalk and MQ the clean way to integrate both of them is by using an adapter. BizTalk server 2006 comes with 2 different set of adapters to talk to MQ. The default MQSeries adapter which gets installed as part of the normal BizTalk installation and the second one MQSC adapter that comes as part of the &amp;quot;BizTalk Adapters for Host System&amp;quot; package. The major difference between the two is the first one can only be used on MQ hosted on windows environment, whereas the second one is used to talk to MQ hosted on windows/non-windows environment. The MQSC adapter is also called as client based adapter because its dependant on IBM MQ&amp;#39;s client API&amp;#39;s. There are two different flavours of MQSC client adapters, the one which supports transaction ? paid license required and the other without transaction ?free no license required (guarantees at-least once delivery, but cannot guarantee duplicate message delivery). Switching between the two types of client adapters is easy via BizTalk Send Port Configuration.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blogs.digitaldeposit.net/saravana/image.axd?picture=WindowsLiveWriter/MarriagebetweenBizTalkServer2006andIBMWe/2AE7DAD1/clip_image012.jpg"&gt;&lt;img style="display: inline; border-width: 0px" src="/saravana/image.axd?picture=WindowsLiveWriter/MarriagebetweenBizTalkServer2006andIBMWe/384DEDD7/clip_image012_thumb.jpg" border="0" alt="clip_image012" title="clip_image012" width="244" height="45" /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
You can learn more about them here: &lt;a href="http://blogs.msdn.com/biztalkcpr/archive/2008/10/07/snap-shot-of-biztalk-2006-solutions-for-mqseries.aspx"&gt;http://blogs.msdn.com/biztalkcpr/archive/2008/10/07/snap-shot-of-biztalk-2006-solutions-for-mqseries.aspx&lt;/a&gt;, and &lt;a href="http://msdn.microsoft.com/en-us/library/aa772116(BTS.10).aspx"&gt;http://msdn.microsoft.com/en-us/library/aa772116(BTS.10).aspx&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
A bit of research was required to settle for the right adapter, in our case it?s definitely a client based MQSC adapter since MQ was hosted on a non-windows environment.
&lt;/p&gt;
&lt;p&gt;
&lt;u&gt;&lt;strong&gt;Bonus Findings!!:&lt;/strong&gt;&lt;/u&gt;
&lt;/p&gt;
&lt;p&gt;
1. You can just install the WebSphere MQ client API&amp;#39;s by doing running the WebSphere MQ 7.0 custom setup and selecting Windows client tools as shown below:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blogs.digitaldeposit.net/saravana/image.axd?picture=WindowsLiveWriter/MarriagebetweenBizTalkServer2006andIBMWe/37E1BAE2/image.png"&gt;&lt;img style="display: inline; border: 0px" src="/saravana/image.axd?picture=WindowsLiveWriter/MarriagebetweenBizTalkServer2006andIBMWe/103B3EB8/image_thumb.png" border="0" alt="image" title="image" width="365" height="287" /&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
2. Once you have settled for the MQSC client adapter, you need to figure out the supported MQ platforms. According to the official document for MQSC adapter (&lt;a href="http://download.microsoft.com/download/c/2/2/c22737c1-707e-42a3-ae45-5df40973a0a7/BizTalk%202006%20R2%20Datasheet.pdf"&gt;http://download.microsoft.com/download/c/2/2/c22737c1-707e-42a3-ae45-5df40973a0a7/BizTalk%202006%20R2%20Datasheet.pdf&lt;/a&gt;) that comes as part of BizTalk Server 2006 (Host integration server 2006) the supported platforms are &lt;em&gt;5.3 w/ Fix Pack 10 or higher, and 6.0 w/ Fix Pack 1&lt;/em&gt; or higher. But during the prototyping, I figured out the adapter happily talks to MQ 7.0 as long as the MQ 7.0 client is installed. BizTalk 2009 with Host Integration Server 2009 officially supports MQ 7.0.
&lt;/p&gt;
&lt;p&gt;
3. If in case you are working on the MQSeries server based adapter, you will experience lot of issues with strange error codes. Majority of them will be related to transactions and MSDTC. The easiest way to fix it during development and focus on the business problem is to disable transaction on the send and receive port. The other proper option is to configure MSDTC ?Security Configuration correctly as described here &lt;a href="http://msdn.microsoft.com/en-us/library/aa544733.aspx"&gt;http://msdn.microsoft.com/en-us/library/aa544733.aspx&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;&lt;u&gt;Setting up a development environment:&lt;/u&gt;&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
One of the biggest challenges in an integration project (like this!!) involving two different technology stacks is setting up the development environment. You will lose majority of the time sorting out the environment, rather than working on the real problem. In my case it was not any different and I settled for building a virtual machine with everything required. I installed the software in the following order.
&lt;/p&gt;
&lt;p&gt;
1. Clean Windows XP SP3 Virtual machine (OS choice is yours)
&lt;/p&gt;
&lt;p&gt;
2. Installed SQL Server 2005, and SP1 on top of it
&lt;/p&gt;
&lt;p&gt;
3. Installed Visual Studio 2005 (including VC++ components), and SP1 on top of it
&lt;/p&gt;
&lt;p&gt;
4. Installed BizTalk Server 2006 and configured it
&lt;/p&gt;
&lt;p&gt;
5. Installed MQ 7.0 90 days trial version
&lt;/p&gt;
&lt;p&gt;
6. Installed ?BizTalk Adapter for Host Systems?
&lt;/p&gt;
&lt;p&gt;
7. Downloaded &lt;a href="http://www-01.ibm.com/support/docview.wss?uid=swg24000637"&gt;http://www-01.ibm.com/support/docview.wss?uid=swg24000637&lt;/a&gt; IH03.zip file containing RFHUTIL.
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;&lt;u&gt;Make sure BizTalk is able to communicate to MQ:&lt;/u&gt;&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
Once the environment is setup as explained in previous step, the next thing to do is to make sure BizTalk can communicate to MQ without any trouble. In order to test it, create a BizTalk application with a FILE receive port and MQSC send port and hook them together with appropriate filter condition (hint:&lt;em&gt; BTS.ReceivePortName= ReceivePort1&lt;/em&gt;). 
&lt;/p&gt;
&lt;p&gt;
To setup MQSC send port, you need to configure 4 basic properties as shown in the below figure
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blogs.digitaldeposit.net/saravana/image.axd?picture=WindowsLiveWriter/MarriagebetweenBizTalkServer2006andIBMWe/446F67FE/clip_image014.jpg"&gt;&lt;img style="display: inline; border-width: 0px" src="/saravana/image.axd?picture=WindowsLiveWriter/MarriagebetweenBizTalkServer2006andIBMWe/093B8C33/clip_image014_thumb.jpg" border="0" alt="clip_image014" title="clip_image014" width="244" height="215" /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;u&gt;Channel Name:&lt;/u&gt; This is the channel name of type server connection and its case sensitive, for testing purposes the easiest way to create a channel is just by enabling &amp;quot;Remote Administration&amp;quot; on the queue manager. Right-Click on the queue manager and select &amp;quot;Remote Administration&amp;quot;, on the pop-up window click the button &amp;quot;Create&amp;quot; next to &amp;quot;SYSTEM.ADMIN.SVRCONN channel&amp;quot; and click ok.
&lt;/p&gt;
&lt;p&gt;
NOTE: I don&amp;#39;t think this is the safest or right way to create a server connection channel, but on a development environment it certainly works. You should contact your MQ administrator to setup a proper server connection channel.
&lt;/p&gt;
&lt;p&gt;
&lt;u&gt;Connection Name:&lt;/u&gt; It&amp;#39;s in the format &amp;quot;server name(port number)&amp;quot;. The default port when you create queue manager in MQ explorer is 1414.
&lt;/p&gt;
&lt;p&gt;
You need to specify the queue manager name and queue name.
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;&lt;u&gt;JMS MQRFH2 BizTalk Pipeline Component:&lt;/u&gt;&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
At this stage we have a working BizTalk application that&amp;#39;s able to send messages to MQ via the MQSC adapter. Now raises the million dollar question, how are we going to add the required format and headers to message as discussed in the beginning of the article to PUBLISH the message into MQ. &lt;em&gt;JMS MQRFH2 BizTalk Pipeline component&lt;/em&gt;, that comes as part of Microsoft ESB Guidance/Toolkit package comes to our rescue. It&amp;#39;s worth understanding the significance of this pipeline component before we proceed further.
&lt;/p&gt;
&lt;p&gt;
As part of Microsoft ESB Guidance 1.0 &lt;a href="http://msdn.microsoft.com/en-us/library/bb931189.aspx"&gt;http://msdn.microsoft.com/en-us/library/bb931189.aspx&lt;/a&gt;, which was released after BizTalk Server 2006 R2 (later became Microsoft ESB Toolkit 2.0 &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=BC86CF1E-EF29-4B19-95F7-388F64555090&amp;amp;displaylang=en"&gt;http://www.microsoft.com/downloads/details.aspx?FamilyID=BC86CF1E-EF29-4B19-95F7-388F64555090&amp;amp;displaylang=en&lt;/a&gt; after the release of BizTalk Server 2009), Microsoft released JMS MQRFH2 BizTalk encoder/decoder pipeline component to help customers utilizing Java Messaging Service (JMS) for their integration needs. At this point it&amp;#39;s worth understanding the basic structure of MQ message and how JMS integrates with MQ.
&lt;/p&gt;
&lt;p&gt;
WebSphere MQ messages are composed of three components: 
&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;The WebSphere MQ Message Descriptor (MQMD) &lt;/li&gt;
	&lt;li&gt;One or more optional message headers (in our case MQRFH2 header) &lt;/li&gt;
	&lt;li&gt;The message body. &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
The message descriptor contains standard message properties, applicable to all WebSphere MQ messages. The second component, optional message headers (example MQRFH2, CICS etc) are application specific. For example when MQ is integrated with JMS, certain information are mapped into the MQRFH2 headers as shown in the below diagram. 
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blogs.digitaldeposit.net/saravana/image.axd?picture=WindowsLiveWriter/MarriagebetweenBizTalkServer2006andIBMWe/482D0CCE/clip_image016.jpg"&gt;&lt;img style="display: inline; border-width: 0px" src="/saravana/image.axd?picture=WindowsLiveWriter/MarriagebetweenBizTalkServer2006andIBMWe/2AD7B504/clip_image016_thumb.jpg" border="0" alt="clip_image016" title="clip_image016" width="558" height="218" /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
The JMS MQRFH2 encoder and decoder BizTalk pipeline component helps customers to extend their JMS integration with Microsoft BizTalk server as shown in the below figure. &lt;a href="http://blogs.digitaldeposit.net/saravana/image.axd?picture=WindowsLiveWriter/MarriagebetweenBizTalkServer2006andIBMWe/4537A81B/clip_image018.jpg"&gt;&lt;img style="display: inline; border-width: 0px" src="/saravana/image.axd?picture=WindowsLiveWriter/MarriagebetweenBizTalkServer2006andIBMWe/7C9DB949/clip_image018_thumb.jpg" border="0" alt="clip_image018" title="clip_image018" width="558" height="218" /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
Using the encoder component the correct JMS message with relevant MQRFH2 header information can be constructed and submitted into WebSphere MQ, on the other hand BizTalk can receive JMS messages from WebSphere MQ and decode the JMS specific properties present in the MQRFH2 headers and write it to the context properties of the message.
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;&lt;u&gt;Installing JMS MQRFH2 component for BizTalk Server 2006:&lt;/u&gt;&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
JMS MQRFH2 component was bundled along with ESB Guidance/Toolkit packages which were released and targeted for Microsoft BizTalk Server 2006 R2 and 2009. 
&lt;/p&gt;
&lt;p&gt;
One of the constraints I forgot to mention in the beginning was, our environment is still BizTalk Server 2006 (not a big surprise in big enterprise where product migration doesn&amp;#39;t happen that often), which mean we are still on .NET Framework 2.0.
&lt;/p&gt;
&lt;p&gt;
This constraint prevented me from installing the latest Microsoft ESB Toolkit 2.0; as soon as you start the installation it will halt straight away asking you to install .NET Framework 3.5. Also, the other important information, ESB Toolkit 2.0 is not an open source project anymore like its predecessor Microsoft ESB Guidance 1.0.
&lt;/p&gt;
&lt;p&gt;
But still there is some good news; ESB Guidance 1.0 is still available for download with complete source code at &lt;a href="http://msdn.microsoft.com/en-us/library/bb931189.aspx"&gt;http://msdn.microsoft.com/en-us/library/bb931189.aspx&lt;/a&gt; and the JMS MQRFH2 is a normal pipeline component without any dependency on either BizTalk 2006 R2 or 2009 specific functionalities. That means, you can take the code from the package, compile it and deploy it in your BizTalk 2006 environment.
&lt;/p&gt;
&lt;p&gt;
Once you have installed the downloaded msi file, navigate to &amp;quot;C:\Program Files\Microsoft ESB Guidance 1.0 - November 2007&amp;quot; and unzip the file ESBSource. We are interested in only 3 BizTalk projects highlighted in the below picture.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blogs.digitaldeposit.net/saravana/image.axd?picture=WindowsLiveWriter/MarriagebetweenBizTalkServer2006andIBMWe/4CFF9ABD/image.png"&gt;&lt;img style="display: inline; border-width: 0px" src="/saravana/image.axd?picture=WindowsLiveWriter/MarriagebetweenBizTalkServer2006andIBMWe/65230518/image_thumb.png" border="0" alt="image" title="image" width="299" height="424" /&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
&lt;u&gt;ESB.JMS.Schemas.Property:&lt;/u&gt;
&lt;/p&gt;
&lt;p&gt;
This project contains all the relevant context properties associated with MQRFH2 header. Open the project in Visual Studio 2005, open the project properties and change the application name to &amp;quot;JMS.ESB&amp;quot; (any name you wish). Compile and deploy the project. 
&lt;/p&gt;
&lt;p&gt;
&lt;u&gt;ESB.JMS.PipelineComponents:&lt;/u&gt;
&lt;/p&gt;
&lt;p&gt;
This is the core component, and compiling this project requires some attention.&amp;nbsp; This project is developed as a C++ project due to its dependencies with IBM C header files to construct the MQRFH2 headers. If you have installed VC++ on your system, you shouldn&amp;#39;t have any problem compiling it. As you probably know, any BizTalk Pipeline component assembly should be present in the GAC, but in order to put the assembly in GAC it needs to be signed with a strong name key. There are some constraints in signing the assembly generated by this project, which is documented here &lt;a href="http://msdn.microsoft.com/en-us/library/ee250074(BTS.10).aspx"&gt;http://msdn.microsoft.com/en-us/library/ee250074(BTS.10).aspx&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
Once the project is compiled successfully, the easy option to add a strong name key to the compiled assembly is by issuing the following command 
&lt;/p&gt;
&lt;p&gt;
&lt;em&gt;&lt;font color="#ff8000"&gt;&lt;strong&gt;SN&lt;/strong&gt; &lt;strong&gt;?R&lt;/strong&gt; &amp;quot;C:\Program Files\Microsoft BizTalk Server 2006\Pipeline Components\ Microsoft.Practices.ESB.JMS.PipelineComponents.dll&amp;quot; &amp;quot;C:\Program Files\Microsoft ESB Guidance 1.0 - November 2007\ESBSource\Keys\ Microsoft.Practices.ESB.snk&amp;quot;&lt;/font&gt;&lt;/em&gt;
&lt;/p&gt;
&lt;p&gt;
The above command will re-sign the assembly with the new key file. You can then put the assembly into the GAC by using gacutils. 
&lt;/p&gt;
&lt;p&gt;
&lt;u&gt;ESB.JMS.Pipelines:&lt;/u&gt;
&lt;/p&gt;
&lt;p&gt;
This project contains all the support BizTalk pipelines utilizing the encode and decode pipeline components created by EMS.JMS.PipelineComponents assembly. This project is found under the samples\JMS\Source folder, open the project in Visual Studio 2005, open the project properties and change the application name to &amp;quot;JMS.ESB&amp;quot; (or whatever name you have selected while deploying ESB.JMS.Schemas.Property project). Compile and deploy the project.
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;&lt;u&gt;The JMS MQRFH2 component logic:&lt;/u&gt;&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
The component first inspects the BizTalk context property MQMD_Format and if its equal to &amp;quot;MQHRF2 &amp;quot; (important:with 2 trailing spaces, and its NOT MQ&lt;strong&gt;RF&lt;/strong&gt;H2 but MQ&lt;strong&gt;HR&lt;/strong&gt;F2 due to header structure), then it applies the logic and adds the MQRFH2 headers else its just pass the incoming message as it is.
&lt;/p&gt;
&lt;p&gt;
The component builds a default MQRFH2 Header using the IBM Header definition file &amp;quot;cmqc.h&amp;quot;. Then the Message Context Properties are checked and for each of the MQRFH2_Properties:&amp;quot;MQRFH2_StrucLength&amp;quot; &amp;quot;MQRFH2_Encoding&amp;quot; &amp;quot;MQRFH2_CodedCharSetId? &amp;quot;MQRFH2_Flags&amp;quot; &amp;quot;MQRFH2_NameValueCCSID&amp;quot; &amp;quot;MQRFH2_Format&amp;quot; If the property is set, then the value is parsed to determine if it is the appropriate type, i.e. Integer or 6 Character String. If the value is a correct type, then the value is written to the MQRFH2 Header. 
&lt;/p&gt;
&lt;p&gt;
Once each of the fixed values is set, then the length of the &amp;quot;MQRFH2_NameValueData&amp;quot; variable is determined and written to the &amp;quot;MQRFH2.NameValueLength&amp;quot; value in the MQRFH2 structure. Finally the content of the &amp;quot;MQRFH2_NameValueData&amp;quot; is prepended to the outbound MQRFH2 structure. 
&lt;/p&gt;
This final structure is then pre-pended to the outbound message body. 
&lt;p&gt;
The component also takes care of encoding rules during this process.
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;&lt;u&gt;Steps to PUBLISH a message into WebSphere MQ?&lt;/u&gt;&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
As discussed in the beginning of the article, publishing a message into WebSphere MQ is nothing more than adding some additional MQRFH2 headers into the message.&amp;nbsp; With the help of JMS MQRFH2 pipeline component the task is seamless.&amp;nbsp; Here are the steps to successfully PUBLISH the message into WebSphere MQ
&lt;/p&gt;
&lt;p&gt;
1. In your BizTalk Application add a reference to the BizTalk application &amp;quot;JMS.ESB&amp;quot; (refer to &amp;quot;Installing JMS MQRFH2 component for BizTalk Server 2006&amp;quot; topic), so that you get access to deployed schemas and pipelines.
&lt;/p&gt;
&lt;p&gt;
2. Create a static one-way send port configured with MQSC adapter similar to the one discussed under the topic &amp;quot;Make sure BizTalk is able to communicate with MQ&amp;quot;.
&lt;/p&gt;
&lt;p&gt;
3. On the send port change the pipeline to JMS.PassThroughSend 
&lt;/p&gt;
&lt;p&gt;
4. Inside your Orchestration set the following context properties on the outgoing message. Build and deploy the orchestration
&lt;/p&gt;
&lt;p&gt;
&lt;em&gt;&lt;font color="#ff8000"&gt;MSG_OUT(MQSeries.MQMD_Format) = &amp;quot;MQHRF2&amp;nbsp; &amp;quot;; &lt;/font&gt;&lt;/em&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;em&gt;&lt;font color="#ff8000"&gt;MSG_OUT(Microsoft.Practices.ESB.JMS.Schemas.Property.MQRFH2_NameValueData) = &amp;quot;&lt;strong&gt;&amp;lt;psc&amp;gt;&amp;lt;Command&amp;gt;Publish&amp;lt;/Command&amp;gt;&amp;lt;Topic&amp;gt;Test&amp;lt;/Topic&amp;gt;&amp;lt;/psc&amp;gt;&lt;/strong&gt;&amp;quot;;&lt;/font&gt;&lt;/em&gt;
&lt;/p&gt;
&lt;p&gt;
NameValueData is where you specify the psc command with application specific topic information in a XML format. 
&lt;/p&gt;
&lt;p&gt;
NOTE: I assumed the readers are familiar with binding and running the BizTalk Application.
&lt;/p&gt;
&lt;p&gt;
Run the application with a sample message and inspect the corresponding WebSphere queue using MQ explorer.
&lt;/p&gt;
&lt;p&gt;
The queue will resemble to the one shown in below figure with all the relevant MQRFH2 properties.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blogs.digitaldeposit.net/saravana/image.axd?picture=WindowsLiveWriter/MarriagebetweenBizTalkServer2006andIBMWe/2B33C22C/image.png"&gt;&lt;img style="display: inline; border: 0px" src="/saravana/image.axd?picture=WindowsLiveWriter/MarriagebetweenBizTalkServer2006andIBMWe/5D4AECA9/image_thumb.png" border="0" alt="image" title="image" width="555" height="258" /&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
Issues Encountered:
&lt;/p&gt;
&lt;p&gt;
There were couple of issues which returned the error reason code 2142 and 2085. 2142 was mainly due to MQRC_HEADER_ERROR, By hard coding the CodedCharSetId value to 437 the issue was resolved. 2085 was mainly due to UNKNOWN OBJECT, which was resolved by hard coding the StructLength to 96 (based on the psc command length). Still some minor work required to remove these hard coded values, but it should not be a big show stopper. 
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;&lt;u&gt;Conclusion:&lt;/u&gt;&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
The article summarised how custom MQRFH2 headers can be added to the WebSphere MQ messages utilizing the JMS MQRFH2 pipeline component that comes as part of ESB Guidance 1.0 and ESB Toolkit 2.0. The article also explained how the component can be utilized in a BizTalk server 2006 environment by obtaining the source code. Even though the original component was written to transmit and receive JMS specific header in the MQ message, in this article we have seen how it can be utilized to PUBLISH messages into MQ. 
&lt;/p&gt;
&lt;p&gt;
The end result is, it would have been impossible to achieve it without the JMS MQRFH2 component that comes as part of ESB Guidance/Toolkit. This article is bit long, but I hope reading a document for couple of hours is&amp;nbsp; better than spending 3 days finding a solution :-)
&lt;/p&gt;
&lt;p&gt;
Nandri!
&lt;/p&gt;
&lt;p&gt;
Saravana
&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/SaravanaKumar/~4/yRcMtZSxMm4" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/SaravanaKumar/~3/yRcMtZSxMm4/post.aspx</link>
      <author>saravana.kumar.nospam@nospam.biztalk247.co.uk (saravana)</author>
      <comments>http://blogs.digitaldeposit.net/SARAVANA/post/2009/09/28/Marriage-between-BizTalk-Server-2006-and-IBM-WebSphere-Message-Broker.aspx#comment</comments>
      <guid isPermaLink="false">http://blogs.digitaldeposit.net/SARAVANA/post.aspx?id=0f5a3539-eec6-4617-9fde-2f6befde41d1</guid>
      <pubDate>Mon, 28 Sep 2009 22:54:00 +0000</pubDate>
      <category>BizTalk 2006</category>
      <dc:publisher>saravana</dc:publisher>
      <pingback:server>http://blogs.digitaldeposit.net/SARAVANA/pingback.axd</pingback:server>
      <pingback:target>http://blogs.digitaldeposit.net/SARAVANA/post.aspx?id=0f5a3539-eec6-4617-9fde-2f6befde41d1</pingback:target>
      <slash:comments>1</slash:comments>
      <trackback:ping>http://blogs.digitaldeposit.net/SARAVANA/trackback.axd?id=0f5a3539-eec6-4617-9fde-2f6befde41d1</trackback:ping>
      <wfw:comment>http://blogs.digitaldeposit.net/SARAVANA/post/2009/09/28/Marriage-between-BizTalk-Server-2006-and-IBM-WebSphere-Message-Broker.aspx#comment</wfw:comment>
      <wfw:commentRss>http://blogs.digitaldeposit.net/SARAVANA/syndication.axd?post=0f5a3539-eec6-4617-9fde-2f6befde41d1</wfw:commentRss>
    <feedburner:origLink>http://blogs.digitaldeposit.net/SARAVANA/post.aspx?id=0f5a3539-eec6-4617-9fde-2f6befde41d1</feedburner:origLink></item>
    <item>
      <title>Temporary Post Used For Theme Detection (c7f1455c-4e85-45e5-99ff-f43ca3426ac7 - 3bfe001a-32de-4114-a6b4-4005b770f6d7)</title>
      <description>&lt;p&gt;This is a temporary post that was not deleted. Please delete this manually. (e98e906f-0c87-48d4-a9c9-fdaf2ed54c1b - 3bfe001a-32de-4114-a6b4-4005b770f6d7)&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/SaravanaKumar/~4/oOlZqhoAbxI" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/SaravanaKumar/~3/oOlZqhoAbxI/post.aspx</link>
      <author>saravana.kumar.nospam@nospam.biztalk247.co.uk (saravana)</author>
      <comments>http://blogs.digitaldeposit.net/SARAVANA/post/2009/09/27/Temporary-Post-Used-For-Theme-Detection-(c7f1455c-4e85-45e5-99ff-f43ca3426ac7-3bfe001a-32de-4114-a6b4-4005b770f6d7).aspx#comment</comments>
      <guid isPermaLink="false">http://blogs.digitaldeposit.net/SARAVANA/post.aspx?id=11362b72-389c-421c-98df-5744af2491b6</guid>
      <pubDate>Sun, 27 Sep 2009 08:58:24 +0000</pubDate>
      <dc:publisher>saravana</dc:publisher>
      <pingback:server>http://blogs.digitaldeposit.net/SARAVANA/pingback.axd</pingback:server>
      <pingback:target>http://blogs.digitaldeposit.net/SARAVANA/post.aspx?id=11362b72-389c-421c-98df-5744af2491b6</pingback:target>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://blogs.digitaldeposit.net/SARAVANA/trackback.axd?id=11362b72-389c-421c-98df-5744af2491b6</trackback:ping>
      <wfw:comment>http://blogs.digitaldeposit.net/SARAVANA/post/2009/09/27/Temporary-Post-Used-For-Theme-Detection-(c7f1455c-4e85-45e5-99ff-f43ca3426ac7-3bfe001a-32de-4114-a6b4-4005b770f6d7).aspx#comment</wfw:comment>
      <wfw:commentRss>http://blogs.digitaldeposit.net/SARAVANA/syndication.axd?post=11362b72-389c-421c-98df-5744af2491b6</wfw:commentRss>
    <feedburner:origLink>http://blogs.digitaldeposit.net/SARAVANA/post.aspx?id=11362b72-389c-421c-98df-5744af2491b6</feedburner:origLink></item>
    <item>
      <title>SOA Initiative: Get your schemas and service contracts correct.</title>
      <description>&lt;p&gt;SOA in an organisation is a journey; an organisation can't change their existing strategy overnight. There are tons of articles written about SOA initiative, so I'm not going to add one more. In this article I'll assume, your organisation has decided to implement SOA and as part of the journey you decided to implement your first service. Your journey is not going to stop after building your first service, so the organisation should plan and impose all of their SOA strategies and design principles when building their first service and treat it as a base platform for the forth coming services.&lt;/p&gt;  &lt;p&gt;When it comes to building services, the basic building blocks are schemas and service contracts. In technical terms it translates to &lt;em&gt;xsd's&lt;/em&gt; and &lt;em&gt;wsdl's&lt;/em&gt;. Often times refactoring schemas will have a ripple effect right up to the top level, so it worth putting enough time and effort in nailing down your schema (data) and service contract requirements.&lt;/p&gt;  &lt;p&gt;We'll just assume this sample scenario: Your organisation is building an address service with a single operation called &lt;em&gt;FindAddress&lt;/em&gt;. Using the service, consumers can search for addresses based on building number and post code (&lt;em&gt;SearchRequest&lt;/em&gt;). The service in turn will return the list of addresses (&lt;em&gt;SearchResponse&lt;/em&gt;) that matched the criteria. The scenario is simple, so we can concentrate on the core principles. The structure of our Address Service looks like this&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.digitaldeposit.net/saravana/image.axd?picture=WindowsLiveWriter/SOAInitiativeGetyourschemasandserviceco/38E36D5F/clip_image002.jpg"&gt;&lt;img title="clip_image002" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="171" alt="clip_image002" src="http://blogs.digitaldeposit.net/saravana/image.axd?picture=WindowsLiveWriter/SOAInitiativeGetyourschemasandserviceco/7436D31D/clip_image002_thumb.jpg" width="514" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;First of all, let's break down the things required to construct our Address Services.&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;We need a unique namespace to uniquely identify our Address service. &lt;/li&gt;    &lt;li&gt;We need unique identifier to access our operation &lt;em&gt;FindAddress&lt;/em&gt;. This in web services world will be &lt;em&gt;SOAPAction&lt;/em&gt;. Normally its good practice to club the service namespace with the operation name to generate this identifier. &lt;/li&gt;    &lt;li&gt;We need a request (&lt;em&gt;SearchRequest&lt;/em&gt;) and a response (&lt;em&gt;SearchResponse&lt;/em&gt;) message structure (types) required for our operation &lt;em&gt;FindAddress&lt;/em&gt;. &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;There are various things you need to consider while designing the schemas and service contracts. Some of them will look so obvious and basic; things like folder structure, file names, namespace, placement of complex data structures, taking advantage of object oriented support for XSD's etc. But they will prove very critical when the services start to evolve.&lt;/p&gt;  &lt;p&gt;The basic building block required for our address services is the request (&lt;em&gt;SearchRequest&lt;/em&gt;) and response (&lt;em&gt;SearchResponse&lt;/em&gt;) message structures. It was not so uncommon people dived directly into tools like Visual Studio, open up a &lt;em&gt;.asmx/WCF&lt;/em&gt; web project or similar tools/techniques in other platforms and start building (implementing) the service before finalising the contract. The tools in turn auto generate the service contracts (&lt;em&gt;wsdl&lt;/em&gt;). It's a great help from the tooling point of view, but its not going to help us in long run. Maintainability and versioning will become a major issues, since the service contract and service implementation are tightly couples. A better approach will be to build the schemas and contracts in a modular way, so each module can evolve independently with various version numbers.&lt;/p&gt;  &lt;p&gt;I just picked up this quote (while reading a post from Martin Fowler) from Kent Beck, which I feel is very relevant, while designing the schemas:&lt;/p&gt;  &lt;p&gt;&lt;i&gt;People can read your programs much more quickly and accurately if they can understand them in detail, then chunk those details into higher level structures.&lt;/i&gt; -&lt;i&gt;-&lt;a href="http://www.amazon.com/Smalltalk-Best-Practice-Patterns-Kent/dp/013476904X"&gt;Kent Beck&lt;/a&gt;&lt;/i&gt;&lt;/p&gt;  &lt;p&gt;Basically Kent Beck is insisting on breaking large methods into well named smaller methods, a technique he refers to as Composed Method Patterns. That's exactly what we are going to do here, we are going to break a large schema structure into smaller more maintainable structures in various files.&lt;/p&gt;  &lt;p&gt;The below figure explains what we are trying to achieve in a nutshell:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.digitaldeposit.net/saravana/image.axd?picture=WindowsLiveWriter/SOAInitiativeGetyourschemasandserviceco/3400B9A3/clip_image004.jpg"&gt;&lt;img title="clip_image004" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="514" alt="clip_image004" src="http://blogs.digitaldeposit.net/saravana/image.axd?picture=WindowsLiveWriter/SOAInitiativeGetyourschemasandserviceco/019CE624/clip_image004_thumb.jpg" width="520" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Figure 1&lt;/p&gt;  &lt;p&gt;When we translate the above picture into technical terms using xsd, wsld, import, data types etc. It will look like the one shown below.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.digitaldeposit.net/saravana/image.axd?picture=WindowsLiveWriter/SOAInitiativeGetyourschemasandserviceco/084FEFA7/clip_image006.jpg"&gt;&lt;img title="clip_image006" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="392" alt="clip_image006" src="http://blogs.digitaldeposit.net/saravana/image.axd?picture=WindowsLiveWriter/SOAInitiativeGetyourschemasandserviceco/4F3912A4/clip_image006_thumb.jpg" width="558" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Figure 2&lt;/p&gt;  &lt;p&gt;The hierarch and complexity of having multiple files to construct such simple message types might look overwhelming initially, but trust me it's going to pay off in long run, when you start leveraging more services in your organisation. &lt;/p&gt;  &lt;p&gt;Target Namespaces for various levels    &lt;table cellspacing="0" cellpadding="0" border="1"&gt;&lt;tbody&gt;       &lt;tr&gt;         &lt;td valign="top" width="175"&gt;Filename &lt;/td&gt;          &lt;td valign="top" width="393"&gt;Target Namespace &lt;/td&gt;       &lt;/tr&gt;        &lt;tr&gt;         &lt;td valign="top" width="175"&gt;AddressService_1.wsdl &lt;/td&gt;          &lt;td valign="top" width="393"&gt;http://yourorg.com/wsdl/addressService/1 &lt;/td&gt;       &lt;/tr&gt;        &lt;tr&gt;         &lt;td valign="top" width="175"&gt;AddressService_1.xsd &lt;/td&gt;          &lt;td valign="top" width="393"&gt;http://yourorg.com/schemas/service/address/1 &lt;/td&gt;       &lt;/tr&gt;        &lt;tr&gt;         &lt;td valign="top" width="175"&gt;Address_1_0.xsd &lt;/td&gt;          &lt;td valign="top" width="393"&gt;http://yourorg.com/schema/entity/address/1.0 &lt;/td&gt;       &lt;/tr&gt;        &lt;tr&gt;         &lt;td valign="top" width="175"&gt;OrgDataTypes_1_0.xsd &lt;/td&gt;          &lt;td valign="top" width="393"&gt;http://yourorg.com/schema/entity/common/1.0 &lt;/td&gt;       &lt;/tr&gt;     &lt;/tbody&gt;&lt;/table&gt; &lt;/p&gt;  &lt;p&gt;The numbers at the end of the namespaces and file names are there to mainly help us in versioning schemas and service contracts. I'll explain them in my next article. For the time being please ignore them.&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;u&gt;Organisation wide common data models (&lt;em&gt;OrgDataTypes_1_0.xsd&lt;/em&gt;):&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;The very first thing you need to do before constructing any services in your organisation is to find all the common entities (data structures) that will be required across the organisation. It will be difficult to identify all of them at on go, but you can always start with the basic list and add more structures to it as and when you identify them. That's the whole point of having those version numbers at the end and in the target namespace.&lt;/p&gt;  &lt;p&gt;Majority of the types in &lt;em&gt;OrgDataTypes_1_0.xsd&lt;/em&gt; will have simple or complex type with restrictions appropriate for your organisation. Whenever you are constructing complex data models, don't be tempted to use the standard &lt;em&gt;xsd&lt;/em&gt; types directly inside your complex types. Example: While constructing the &lt;em&gt;UKAddress&lt;/em&gt; type which requires a postcode, you could have easily end up using &lt;u&gt;&lt;em&gt;xsd:string&lt;/em&gt;&lt;/u&gt; type for post code. But in our solution we defined a simple type called &lt;em&gt;PostCode&lt;/em&gt; which is an extension of &lt;em&gt;&lt;u&gt;xsd:string&lt;/u&gt;&lt;/em&gt; with a regular expression pattern restricting to only UK post code. In this way your schema validation will be effective and be able to capture the errors much earlier in the cycle. Also it will be a consistent pattern across the organisation.&lt;/p&gt;  &lt;p&gt;&lt;font color="#ff0080"&gt;&amp;lt;xsd:simpleType name=&amp;quot;Postcode&amp;quot;&amp;gt;      &lt;br /&gt;&amp;lt;xsd:restriction base=&amp;quot;xsd:string&amp;quot;&amp;gt; &amp;lt;xsd:pattern value=&amp;quot;((([A-Z]{2}[0-9]{1,2})|([A-Z]{1,2}[0-9][A-Z])|([A-Z][0-9]{1,2}))\s([0-9][A-Z]{2})|(BFPO\s\d{1,4})|(GIR\s0AA))&amp;quot;/&amp;gt; &amp;lt;/xsd:restriction&amp;gt;       &lt;br /&gt;&amp;lt;/xsd:simpleType&amp;gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;Another important reason to build the common types used across the organisation is reusability; these types may be required across many services you build in the future. Example: The &lt;em&gt;PostCode&lt;/em&gt; type may be required in the &lt;em&gt;InventoryService&lt;/em&gt; to determine the stock location post code.&lt;/p&gt;  &lt;p&gt;It's important you decide on the format of the namespace (target) you want to use. For our example I've chosen http://yourorg.com/schema/entity/common/1.0&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;u&gt;Address Service specific data models (&lt;em&gt;Address_1_0.xsd&lt;/em&gt;):&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;After defining the common entity structures, the next step is to build the entity types required for our address service. &lt;em&gt;Address_1_0.xsd&lt;/em&gt; file will contain only service specific simple and complex types required to construct the address service. The first thing you need to do is to import &lt;em&gt;OrgDataTypes_1_0.xsd&lt;/em&gt; file into &lt;em&gt;Address_1_0.xsd&lt;/em&gt;, which contains all the basic building blocks (entities) used common across the organisation.&lt;/p&gt;  &lt;p&gt;&lt;em&gt;&lt;font color="#ff0080"&gt;&amp;lt;xsd:import namespace=&amp;quot;http://yourorg.com/schema/entity/common/1.0&amp;quot; schemaLocation=&amp;quot;../../Common/1.0/OrgDatatypes_1_0.xsd&amp;quot;/&amp;gt;&lt;/font&gt;&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;Once the common entity schema is imported, the next important thing to do is to decide on a unique namespace (target) for the service specific schema &lt;em&gt;Address_1_0.xsd&lt;/em&gt;. Make sure it's different from the one we have used for the common entity schema. For our example I've chosen http://yourorg.com/schema/entity/address/1.0. &lt;/p&gt;  &lt;p&gt;Now you can start defining the entities required for the address service inside &lt;em&gt;Address_1_0.xsd&lt;/em&gt;. Example: As shown in figure 2, &lt;em&gt;Address_1_0.xsd&lt;/em&gt; contains the complex type &lt;em&gt;UKAddress&lt;/em&gt; to represent a UK address structure, which is basically constructed using all the common entity types found in &lt;em&gt;OrgDataTypes_1_0.xsd&lt;/em&gt;. &lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;u&gt;Address Service specific messages (&lt;em&gt;AddressService_1.xsd&lt;/em&gt;):&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;This is the place where we construct the types that will be used directly by the service contracts &lt;em&gt;WSDL&lt;/em&gt;. Similar to what we have done while constructing &lt;em&gt;Address_1_0.xsd&lt;/em&gt;, the first thing we'll do here is to import the required schemas (&lt;em&gt;Address_1_0.xsd&lt;/em&gt; and if required you can download the &lt;em&gt;OrgDataTypes_1_0.xsd&lt;/em&gt; as well if you are referring to types directly from common entities).&lt;/p&gt;  &lt;p&gt;In &lt;em&gt;AddressService_1.xsd&lt;/em&gt; we will define types that are explicitly required to build the service contract (ex: &lt;em&gt;SearchRequest&lt;/em&gt;, &lt;em&gt;SearchResponse&lt;/em&gt;). Majority of the times these types won't have any reusable value outside the context of the service. Types like service specific errors, warnings, etc are good candidate for this file. Again it's essential to choose a consistent and unique target namespace format. For our example I've chosen http://yourorg.com/schemas/service/address/1. &lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;u&gt;Constructing Service Interface (AddressService_1.wsdl)&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;At this stage we got all the required building blocks to construct our Address Service WSDL. You can hand craft it, if you are familiar with the semantics of WSDL. Otherwise you can use the tools like XmlSpy, ThinkTectures WSCF (web service contract first) etc to construct the service WSDL.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;u&gt;Folder Structure:&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Its also important to place the schemas and wsdl files in the right hierarch in the files system and contract repositories. You'll referencing/importing schemas regularly in order to construct new service specific schemas and contracts (WSDL's). Ex:&lt;/p&gt;  &lt;p&gt;&lt;em&gt;&lt;font color="#ff0080"&gt;&amp;lt;xsd:import namespace=&amp;quot;http://yourorg.com/schema/entity/common/1.0&amp;quot; schemaLocation=&amp;quot;../../Common/1.0/OrgDatatypes_1_0.xsd&amp;quot;/&amp;gt;&lt;/font&gt;&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;The below figure shows the simple structure&amp;#160; utilized for this sample scenario.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.digitaldeposit.net/saravana/image.axd?picture=WindowsLiveWriter/SOAInitiativeGetyourschemasandserviceco/162235A2/image.png"&gt;&lt;img title="image" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="174" alt="image" src="http://blogs.digitaldeposit.net/saravana/image.axd?picture=WindowsLiveWriter/SOAInitiativeGetyourschemasandserviceco/2F1E05E7/image_thumb.png" width="164" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;u&gt;Advantages of taking this modular approach:&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;There are various advantages in building the schemas and contracts in a modular way. Let see some of the key values&lt;/p&gt;  &lt;p&gt;1. &lt;u&gt;Reusability&lt;/u&gt;: The number one reason is the reusability of types. We have seen the organisation wide types (town, postcode etc) are being reused when constructing the UK Address type in address service. In the future some other service like example Inventory can reuse the UK Address type directly by importing the address schema (with appropriate version number).&lt;/p&gt;  &lt;p&gt;2. &lt;u&gt;Versioning&lt;/u&gt;: Individual modules can evolve independently with different version numbers. Providing greater degree of maintainability.&lt;/p&gt;  &lt;p&gt;3. &lt;u&gt;Extensibility&lt;/u&gt;: XSD supports object oriented approach while designing schemas, which can be utilized to extend the base types and create much more complex types if required.&lt;/p&gt;  &lt;p&gt;Nandri!&lt;/p&gt;  &lt;p&gt;Saravana&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/SaravanaKumar/~4/NtXUywOprds" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/SaravanaKumar/~3/NtXUywOprds/post.aspx</link>
      <author>saravana.kumar.nospam@nospam.biztalk247.co.uk (saravana)</author>
      <comments>http://blogs.digitaldeposit.net/SARAVANA/post/2009/07/29/SOA-Initiative-Get-your-schemas-and-service-contracts-correct.aspx#comment</comments>
      <guid isPermaLink="false">http://blogs.digitaldeposit.net/SARAVANA/post.aspx?id=fc016754-5cd9-4c29-acf8-0f88a5a1281a</guid>
      <pubDate>Wed, 29 Jul 2009 12:38:34 +0000</pubDate>
      <category>SOA</category>
      <dc:publisher>saravana</dc:publisher>
      <pingback:server>http://blogs.digitaldeposit.net/SARAVANA/pingback.axd</pingback:server>
      <pingback:target>http://blogs.digitaldeposit.net/SARAVANA/post.aspx?id=fc016754-5cd9-4c29-acf8-0f88a5a1281a</pingback:target>
      <slash:comments>1</slash:comments>
      <trackback:ping>http://blogs.digitaldeposit.net/SARAVANA/trackback.axd?id=fc016754-5cd9-4c29-acf8-0f88a5a1281a</trackback:ping>
      <wfw:comment>http://blogs.digitaldeposit.net/SARAVANA/post/2009/07/29/SOA-Initiative-Get-your-schemas-and-service-contracts-correct.aspx#comment</wfw:comment>
      <wfw:commentRss>http://blogs.digitaldeposit.net/SARAVANA/syndication.axd?post=fc016754-5cd9-4c29-acf8-0f88a5a1281a</wfw:commentRss>
    <feedburner:origLink>http://blogs.digitaldeposit.net/SARAVANA/post.aspx?id=fc016754-5cd9-4c29-acf8-0f88a5a1281a</feedburner:origLink></item>
  </channel>
</rss>
