Tag Archive for 'BizTalk 2004'

Fast, Efficient Message Archiving for BizTalk with the BizTalk Message Archiving Pipeline Component. Download a Free 14-Day Trial!

Yet more Recommendations for Organisations Getting Started with BizTalk

Richard Seroter has a great article entitled You’ve Just Bought BizTalk Server. Congrats. Now What? over on his blog, in which he lists his top ten recommendations for organizations getting started with BizTalk. He highlights some important points – which I wholeheartedly endorse – including: committing to, and enforce naming standards; setting-up a standard release management plan; defining source code and server access control; identifing your disaster recovery / archive  / purge strategy.

However, I’d like to add a few more to this list (I know it was meant to be a ‘top 10′ but I believe these are equally important):

  • Invest in a good quality infrastructure – Even though this will probably blow your departmental budget, invest in a good quality infrastructure for your BizTalk environment: ensure you have SQL Server clustered in (at least) an active/passive configuration, active/active if you can handle some performance degradation in the event of a node failure and cluster your Enterprise SSO environment; A good quality underlying SAN (ensuring that your BizTalk SQL Server data and log files reside on separate LUNs); and sufficient BizTalk servers to accommodate a receive tier, processing tier (orchestrations) and send tier, which will mean 6 BizTalk servers minimum in a good enterprise setup. When buying servers always purchase hardware with extra capacity (even if it is initially unused) such as additional CPU sockets, giving you the option of a quick-win when you need to scale up your existing hardware, before starting to scale-out. Given that BizTalk 2006, BizTalk 2006 R2 and SQL Server 2005 can run almost natively on 64-bit hardware, go for 64-bit CPU’s. Finally, invest in good quality sys-admins who know what they are doing with all this expensive kit.
  • Invest in smoke, test and staging environmentsDon’t deploy from your dev environment straight into live. Investing in smoke, test and staging environments is worth the cost incurred when compared to the cost of your live environment going down, because the latest solution release or hotfix introduced some unexpected bug or configuration error. Furthermore, these environments don’t have to be expensive: using virtualisation such as VMWare’s ESX server or Microsoft Virtual Server 2005, environments can be provisioned relatively cheaply and on demand – several environments can run on the same hardware for example.
  • Get your DBA’s involved in the project – BizTalk has SQL Server at its core and this environment needs to be performing well to ensure QoS for your BizTalk environment. Richard touched on this point in his article, however it can’t be stressed enough: although BizTalk to a great extent is a ‘black-box’, DBA’s need to ensure that the SQL Server jobs are correctly running, databases (such as the tracking database) are regularly archived or purged, and valid backups are being correctly created, logs are shipped to your DR site and successfully restored. One tip I have learned the hard way: engage your DBA’s early, otherwise they will become disillusioned and the dev team will end up nursing your databases.
  • Read the BizTalk blogs and newsgroups – There are now more than 60 active BizTalk bloggers who have either solved, or who can offer advice on a number of BizTalk development, deployment and operational problems that you will encounter during the life of a BizTalk solution. You can download my OPML file listing 60+ active BizTalk bloggers, or go to the BizTalk Community Blogs via Syndication on the BizTalk Gurus website. If these resources don’t offer the information you need, try posting to the BizTalk Newsgroups; if your an MSDN subscriber, your also entitled to use the managed newsgroups which (I believe) are guaranteed a response from Microsoft.

Subversion & BizTalk: Setting Committer Auto-Properties

In my last post, I discussed how to configure the version control system, Subversion, to correctly handle BizTalk files. Although I did talk about how to set the correct file-type properties and how to mass update files already in the repository, I neglected to detail how to set those properties when files are first added to a repository.

As a committer, you won’t want to keep updating your newly added files with Subversion properties every time you add a or import a file. To resolve this problem, Subversion uses a concept of ‘auto-properties’ – properties that are automatically set on a new file (based on file type) when they are first added to the repository. Auto-properties can either be set in the Subversion configuration file or in the Windows Registry.

Auto-Properties in the Subversion Configuration File

To set auto-properties in the Subversion configuration file, open the config file

%USERPROFILE%\Application Data\Subversion\config

and add lines similar to the following under the [auto-props] section of the file:

[auto-props]
*.btm = svn:mime-type=text/xml
*.btp = svn:mime-type=text/xml
*.odx = svn:mime-type=text/xml
*.xsd = svn:mime-type=text/xml;svn:eol-style=native
*.xml = svn:mime-type=text/xml;svn:eol-style=native
*.xsn = svn:mime-type=application/octet-stream

This sets the MIME-types defined in my earlier post for several common BizTalk file types; note that multiple properties can be set per file type, each separated by a semi-colon (e.g. *.xsd and *.xml file-types).

In order to enable these auto-properties, enable-auto-props under [miscellany] must be set to ‘yes’:

[miscellany]
enable-auto-props = yes

Auto-Properties in the Registry

The same auto-properties settings can be achieved through the Windows Registry. A sample .reg file is shown below that sets the same auto-properties detailed earlier:

REGEDIT4

[HKEY_CURRENT_USER\Software\Tigris.org\Subversion\Config\auto-props]
"*.btm"="svn:mime-type=text/xml"
"*.btp"="svn:mime-type=text/xml"
"*.odx"="svn:mime-type=text/xml"
"*.xsd"="svn:mime-type=text/xml;svn:eol-style=native"
"*.xml"="svn:mime-type=text/xml;svn:eol-style=native"
"*.xsn"="svn:mime-type=application/octet-stream"

[HKEY_CURRENT_USER\Software\Tigris.org\Subversion\Config\miscellany]
"enable-auto-props"="yes"

For a full list of auto-properties that can be set, see the Special Properties section of the Subversion Online Help.

Configuring Subversion to Correctly Handle BizTalk Files

Subversion is a great open-source version control system, however it doesn’t work all that well with BizTalk solutions straight out of the box, particularly orchestration, pipeline and map files. In order to get these artifacts working seamlessly, there are a number of configuration changes that need to be made.

Contextual-Merging & MIME Types

When changes are received from the repository during an update of a local working file, Subversion attempts a contextual, line-based merge of changes. When this is performed on certain Biztalk files (including orchestrations, pipelines and maps) the result is an unreadable file in Visual Studio – the contextual, line-based merge simply can’t handle the file content unless given a little help by correctly specifying the file MIME-type through the Subversion svn:mime-type property.

Because Orchestrations, Maps, Pipelines and Schemas are essentially only Xml (orchestrations may additionally contain embedded XLANG/S code), we can easily set the MIME-type property to text/xml. The property can either be set using the TortoiseSVN Windows Explorer shell extension or via the the Subversion command-line propset command:


svn propset svn:mime-type text/xml TestOrchestration.odx
svn propset svn:mime-type text/xml TestMap.btm
svn propset svn:mime-type text/xml TestPipeline.btp
svn propset svn:mime-type text/xml TestSchema.xsd

To check that the property has been set correctly, you can use the subversion propget command:


svn propget svn:mime-type TestOrchestration.odx
> text/xml

This change ensures that when a local working copy of the file is updated from the repository, Subversion handles the line-based merge correctly. If you need to maintain binary files within your repository, such as InfoPath XSN files, you will need to set the MIME-type property to application/octet-stream.

More information about the MIME-type property can be found in the Subversion Online Help.

Mass Updating File Properties 

Although the TortoiseSVN Explorer shell extension and Subversion command line utilities are helpful, they only operate on one file at a time. To get around this problem, I have written a small VBScript to recursively apply Subversion properties to specified file types within sub-folders – any subversion property can be applied to any file type using the script. A simple batch file could be used to execute the script on each file-type as follows:

cscript SvnSetProps.vbs false "svn:mime-type text/xml" .btm "..\Integration\Biztalk\"
cscript SvnSetProps.vbs false "svn:mime-type text/xml" .btp "..\Integration\Biztalk\"
cscript SvnSetProps.vbs false "svn:mime-type text/xml" .odx "..\Integration\Biztalk\"
cscript SvnSetProps.vbs false "svn:mime-type text/xml" .xsd "..\Integration\Biztalk\"
cscript SvnSetProps.vbs false "svn:mime-type text/xml" .xml "..\Integration\Biztalk\"
cscript SvnSetProps.vbs false "svn:mime-type application/octet-stream" .xsn "..\Integration\Biztalk\"

You can download a copy of the SvnSetProps.vbs script here – please be aware that the script doesn’t do any error checking, so make sure you are confident in its operation by setting the second parameter (‘pretend’) to true – although it appears to be applying the changes, nothing is actually happening. Once you have applied the changes, they need to be committed back to the repository.

Disclaimer

This work is licensed under a Creative Commons Attribution 2.5 License – you can use commercially and modify as necessary, but you must give the original author credit. Furthermore, this script is provided “AS IS” with no warranty. Click the image below to view further detail of the licence.

Creative Commons License



Get Adobe Flash playerPlugin by wpburn.com wordpress themes

Nick Heppleston’s BizTalk Blog is Digg proof thanks to caching by WP Super Cache