<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Mark Harris &#187; Architecture</title>
	<atom:link href="http://www.markharris.net.au/blog/category/architecture/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.markharris.net.au/blog</link>
	<description>musings on Software Development</description>
	<lastBuildDate>Wed, 19 May 2010 12:58:25 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Developing a sense of Scalability</title>
		<link>http://www.markharris.net.au/blog/2010/02/06/developing-a-sense-of-scalability/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=developing-a-sense-of-scalability</link>
		<comments>http://www.markharris.net.au/blog/2010/02/06/developing-a-sense-of-scalability/#comments</comments>
		<pubDate>Fri, 05 Feb 2010 15:41:04 +0000</pubDate>
		<dc:creator>Mark Harris</dc:creator>
				<category><![CDATA[Architecture]]></category>
		<category><![CDATA[asp.net]]></category>
		<category><![CDATA[Scalability]]></category>

		<guid isPermaLink="false">http://www.markharris.net.au/blog/?p=218</guid>
		<description><![CDATA[Scott Hanselman’s recent post about exporting data from a database to a csv file where he talks about how some code could be improved. He does a very nice job of showing how and were the code could remove the smells that were present in the original design. However there are a few things that [...]]]></description>
			<content:encoded><![CDATA[<p>Scott Hanselman’s recent post about <a href="http://www.hanselman.com/blog/BackToBasicsKeepItSimpleAndDevelopYourSenseOfSmellFromLinqToCSV.aspx">exporting data from a database to a csv file</a> where he talks about how some code could be improved. He does a very nice job of showing how and were the code could remove the smells that were present in the original design. However there are a few things that I see that if changed could improve both the performance and scalability of the system.</p>
<p>While this is something that depending on the complexity and scalability needs of your site one may consider over kill, it is something that takes minimal effort in design to create a system that is innately more scalable. What happens when the data you are querying starts to push out is 5-10Mb of Data to a CSV file?</p>
<h2>Option 1</h2>
<p>So rather than generate the list of Foo into a CSV at each request why not pre generate the list at pre configured intervals depending on the volatility of the data and save the resultant CSV to a san that can be served up via IIS. In this scenario there is no need for the ASP.NET worker process to get involved and the IIS process can do what it was meant to do serve content.</p>
<p><a href="http://www.markharris.net.au/blog/wp-content/uploads/2010/02/Pregeneratedfilesystem.png"><img style="border-bottom: 0px; border-left: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px" title="Pregenerated file system" border="0" alt="Pregenerated file system" src="http://www.markharris.net.au/blog/wp-content/uploads/2010/02/Pregeneratedfilesystem_thumb.png" width="484" height="225" /></a> </p>
<h3>Advantages</h3>
<ul>
<li>No need to hit the DB to get the data</li>
<li>You don&#8217;t have to involve the asp.net worker process and let IIS do what its designed to do</li>
</ul>
<h3>Disadvantages</h3>
<ul>
<li>Your data may be stale up to a preconfigured amount of time (but since its going to a report of sorts it is more than likely stale)</li>
</ul>
<h2>Option 2 </h2>
<p>So your business requirement absolutely dictates that it is required to be generated and sent as the user requests it. There is no choice, you have but to send it through the response stream. BUT there is another way. Say when this request for the data to be exported VIA an AJAX call to your server the response from the server is a URL to where the file will be output. Now the server it self can then send a message to the export to csv service and request the file be output to the san. The client can then poll the server waiting for a 200 response code, when it does get one it can then redirect the browser to the given URL.</p>
<p><a href="http://www.markharris.net.au/blog/wp-content/uploads/2010/02/pollingfilesystem.png"><img style="border-bottom: 0px; border-left: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px" title="polling file system" border="0" alt="polling file system" src="http://www.markharris.net.au/blog/wp-content/uploads/2010/02/pollingfilesystem_thumb.png" width="466" height="320" /></a> </p>
<h3>Advantages</h3>
<ul>
<li>Gives you more or less up to the minute accurate data</li>
<li>Reduces the amount of work the asp.net worker process has to perform</li>
</ul>
<h3>Disadvantages</h3>
<ul>
<li>Introduces polling into the design of the client</li>
</ul>
<p>When designing systems that do not take Scalability into account from the ground up, you generally are missing something. Considering Scalability does not mean that you choose either of these two options all the time. At times it might make sense to think about using the approach suggested in Scott’s article, the key being to always <strike>think about</strike> know your data and make informed decisions.</p>
<p><a href="http://www.addtoany.com/add_to/delicious?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2010%2F02%2F06%2Fdeveloping-a-sense-of-scalability%2F&amp;linkname=Developing%20a%20sense%20of%20Scalability" title="Delicious" rel="nofollow" target="_blank"><img src="http://www.markharris.net.au/blog/wp-content/plugins/add-to-any/icons/delicious.png" width="16" height="16" alt="Delicious"/></a> <a href="http://www.addtoany.com/add_to/google_reader?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2010%2F02%2F06%2Fdeveloping-a-sense-of-scalability%2F&amp;linkname=Developing%20a%20sense%20of%20Scalability" title="Google Reader" rel="nofollow" target="_blank"><img src="http://www.markharris.net.au/blog/wp-content/plugins/add-to-any/icons/reader.png" width="16" height="16" alt="Google Reader"/></a> <a href="http://www.addtoany.com/add_to/twitter?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2010%2F02%2F06%2Fdeveloping-a-sense-of-scalability%2F&amp;linkname=Developing%20a%20sense%20of%20Scalability" title="Twitter" rel="nofollow" target="_blank"><img src="http://www.markharris.net.au/blog/wp-content/plugins/add-to-any/icons/twitter.png" width="16" height="16" alt="Twitter"/></a> <a href="http://www.addtoany.com/add_to/facebook?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2010%2F02%2F06%2Fdeveloping-a-sense-of-scalability%2F&amp;linkname=Developing%20a%20sense%20of%20Scalability" title="Facebook" rel="nofollow" target="_blank"><img src="http://www.markharris.net.au/blog/wp-content/plugins/add-to-any/icons/facebook.png" width="16" height="16" alt="Facebook"/></a> <a href="http://www.addtoany.com/add_to/friendfeed?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2010%2F02%2F06%2Fdeveloping-a-sense-of-scalability%2F&amp;linkname=Developing%20a%20sense%20of%20Scalability" title="FriendFeed" rel="nofollow" target="_blank"><img src="http://www.markharris.net.au/blog/wp-content/plugins/add-to-any/icons/friendfeed.png" width="16" height="16" alt="FriendFeed"/></a> <a href="http://www.addtoany.com/add_to/linkedin?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2010%2F02%2F06%2Fdeveloping-a-sense-of-scalability%2F&amp;linkname=Developing%20a%20sense%20of%20Scalability" title="LinkedIn" rel="nofollow" target="_blank"><img src="http://www.markharris.net.au/blog/wp-content/plugins/add-to-any/icons/linkedin.png" width="16" height="16" alt="LinkedIn"/></a> <a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2010%2F02%2F06%2Fdeveloping-a-sense-of-scalability%2F&amp;linkname=Developing%20a%20sense%20of%20Scalability">Share/Save</a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.markharris.net.au/blog/2010/02/06/developing-a-sense-of-scalability/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Video of Command Query Responsibility Segregation by Udi Dahan</title>
		<link>http://www.markharris.net.au/blog/2010/01/24/video-of-command-query-responsibility-segregation-by-udi-dahan/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=video-of-command-query-responsibility-segregation-by-udi-dahan</link>
		<comments>http://www.markharris.net.au/blog/2010/01/24/video-of-command-query-responsibility-segregation-by-udi-dahan/#comments</comments>
		<pubDate>Sun, 24 Jan 2010 12:33:46 +0000</pubDate>
		<dc:creator>Mark Harris</dc:creator>
				<category><![CDATA[Architecture]]></category>
		<category><![CDATA[CQRS]]></category>

		<guid isPermaLink="false">http://www.markharris.net.au/blog/2010/01/24/video-of-command-query-responsibility-segregation-by-udi-dahan/</guid>
		<description><![CDATA[Udi presented his talk on CQRS at the Victoria.Net User Group on the 19th of January in Melbourne, we recorded his presentation.&#160; Hopefully this is of some benefit despite the audio and video not being the greatest. It was a great night that opened many eyes and ears to the best. &#160; Command Query Responsibility [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.udidahan.com/">Udi</a> presented his talk on CQRS at the <a href="http://www.victoriadotnet.com.au/vic_index.aspx">Victoria.Net User Group</a> on the 19th of January in Melbourne, we recorded his presentation.&#160; Hopefully this is of some benefit despite the audio and video not being the greatest. It was a great night that opened many eyes and ears to the best. </p>
<p align="center">&#160;</p>
<p> <object width="400" height="300"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=8944337&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=8944337&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="400" height="300"></embed></object>
<p align="center"><a href="http://vimeo.com/8944337">Command Query Responsibility Segregation &#8211; Udi Dahan</a> from <a href="http://vimeo.com/markmario">Mark Harris</a> on <a href="http://vimeo.com">Vimeo</a>.</p>
<p><a href="http://www.addtoany.com/add_to/delicious?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2010%2F01%2F24%2Fvideo-of-command-query-responsibility-segregation-by-udi-dahan%2F&amp;linkname=Video%20of%20Command%20Query%20Responsibility%20Segregation%20by%20Udi%20Dahan" title="Delicious" rel="nofollow" target="_blank"><img src="http://www.markharris.net.au/blog/wp-content/plugins/add-to-any/icons/delicious.png" width="16" height="16" alt="Delicious"/></a> <a href="http://www.addtoany.com/add_to/google_reader?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2010%2F01%2F24%2Fvideo-of-command-query-responsibility-segregation-by-udi-dahan%2F&amp;linkname=Video%20of%20Command%20Query%20Responsibility%20Segregation%20by%20Udi%20Dahan" title="Google Reader" rel="nofollow" target="_blank"><img src="http://www.markharris.net.au/blog/wp-content/plugins/add-to-any/icons/reader.png" width="16" height="16" alt="Google Reader"/></a> <a href="http://www.addtoany.com/add_to/twitter?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2010%2F01%2F24%2Fvideo-of-command-query-responsibility-segregation-by-udi-dahan%2F&amp;linkname=Video%20of%20Command%20Query%20Responsibility%20Segregation%20by%20Udi%20Dahan" title="Twitter" rel="nofollow" target="_blank"><img src="http://www.markharris.net.au/blog/wp-content/plugins/add-to-any/icons/twitter.png" width="16" height="16" alt="Twitter"/></a> <a href="http://www.addtoany.com/add_to/facebook?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2010%2F01%2F24%2Fvideo-of-command-query-responsibility-segregation-by-udi-dahan%2F&amp;linkname=Video%20of%20Command%20Query%20Responsibility%20Segregation%20by%20Udi%20Dahan" title="Facebook" rel="nofollow" target="_blank"><img src="http://www.markharris.net.au/blog/wp-content/plugins/add-to-any/icons/facebook.png" width="16" height="16" alt="Facebook"/></a> <a href="http://www.addtoany.com/add_to/friendfeed?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2010%2F01%2F24%2Fvideo-of-command-query-responsibility-segregation-by-udi-dahan%2F&amp;linkname=Video%20of%20Command%20Query%20Responsibility%20Segregation%20by%20Udi%20Dahan" title="FriendFeed" rel="nofollow" target="_blank"><img src="http://www.markharris.net.au/blog/wp-content/plugins/add-to-any/icons/friendfeed.png" width="16" height="16" alt="FriendFeed"/></a> <a href="http://www.addtoany.com/add_to/linkedin?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2010%2F01%2F24%2Fvideo-of-command-query-responsibility-segregation-by-udi-dahan%2F&amp;linkname=Video%20of%20Command%20Query%20Responsibility%20Segregation%20by%20Udi%20Dahan" title="LinkedIn" rel="nofollow" target="_blank"><img src="http://www.markharris.net.au/blog/wp-content/plugins/add-to-any/icons/linkedin.png" width="16" height="16" alt="LinkedIn"/></a> <a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2010%2F01%2F24%2Fvideo-of-command-query-responsibility-segregation-by-udi-dahan%2F&amp;linkname=Video%20of%20Command%20Query%20Responsibility%20Segregation%20by%20Udi%20Dahan">Share/Save</a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.markharris.net.au/blog/2010/01/24/video-of-command-query-responsibility-segregation-by-udi-dahan/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Lessons Learned from building a Linq To Sql Saga Persister</title>
		<link>http://www.markharris.net.au/blog/2009/12/09/lessons-learned-from-building-a-linq-to-sql-saga-persister/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=lessons-learned-from-building-a-linq-to-sql-saga-persister</link>
		<comments>http://www.markharris.net.au/blog/2009/12/09/lessons-learned-from-building-a-linq-to-sql-saga-persister/#comments</comments>
		<pubDate>Tue, 08 Dec 2009 16:28:15 +0000</pubDate>
		<dc:creator>Mark Harris</dc:creator>
				<category><![CDATA[Architecture]]></category>
		<category><![CDATA[NServiceBus]]></category>
		<category><![CDATA[Linq To Sql]]></category>
		<category><![CDATA[saga persister]]></category>

		<guid isPermaLink="false">http://www.markharris.net.au/blog/?p=195</guid>
		<description><![CDATA[Simon has released the first version of the Linq To Sql Saga Persister code and the EF 1 Saga Persister in the past couple of days. In fact we started working on the saga persister mid September, so what took doing something like a Saga Persister, a fairly trivial exercise almost 3 months. To be [...]]]></description>
			<content:encoded><![CDATA[<p>Simon has released the first version of the <a href="http://www.simonsegal.net/blog/2009/12/08/nservicebus-linq-to-sql-saga-persister-part-20/">Linq To Sql Saga Persister</a> code and the <a href="http://www.simonsegal.net/blog/2009/12/09/entity-framework-saga-persister-for-nservicebus/">EF 1 Saga Persister</a> in the past couple of days. In fact we started <a href="http://twitter.com/markmario/status/3992828301">working on the saga persister mid September</a>, so what took doing something like a Saga Persister, a fairly trivial exercise almost 3 months. To be fair Simon initially put some of the <a href="http://www.simonsegal.net/blog/2009/09/22/a-linq-to-sql-saga-persister-for-nservicebus/">work on the persister</a> quite quickly. However once we started to use the code in our test with the Manufacturing sample under load it would begin to creak. Seeing as that was a problem we had to switch to using the NHibernate Saga persister for our client to go into production.</p>
<p>The first thing that went through our minds was that we had written the persister wrong, however a persistent Simon continued to work through the issues. Along the way we discovered a few things.</p>
<ol>
<li>NHibernate is faster and therefore able to handle the load better.</li>
<li>Proper Saga Design is important.</li>
</ol>
<h3>NHibernate is faster</h3>
<p>Most of you already know this but the key thing here is that because its faster it fails less therefore the issues that we saw in the development of the persister was difficult to isolate.</p>
<p>In the Manufacturing Sample that comes with NServiceBus start up all the required services and when the partner is ready run it in simulate mode, it does not fail. doing the same thing when using the L2S persister had the same effect. </p>
<p>Once the number of worker threads on the Order Service Host was increased to 4 could use we started to see a whole bunch of errors. From messages not being completed to violation of primary keys and deadlocks. Using the NHibernate persister required us to increase the workers to 6 or 7 you would start to notice similar errors.This leads me to the next item.</p>
<h3>Proper Saga Design is Important</h3>
<p>If your not sure about what a Saga is please <a href="http://sourceforge.net/apps/mediawiki/nservicebus/index.php?title=Sagas">read the NServiceBus wiki</a>. When considering how you build a system&#160; though that goes into how you would like to handle long running transactions is important. Knowing how many transactions per second. What are the SLA’s? My rule of thumb the more i think about it is that a Saga message that starts the saga should be unique any subsequent messages that are part of that saga should be dealt with a more explicit message handler. So you have a CreateOrderMessage that starts a saga and subsequent messages are handled by UpdateOrderMessages for changes to the order, with CancelOrderMessages and AuthorizeOrderMessages being explicit to the saga. </p>
<p>In my opinion doing so produces both a simpler and more explicit design of your long lived transaction. This however is now going down the path of a different post one that warrants a post of it own.</p>
<p>The <a href="http://graysmatter.codivation.com/post/How-I-Am-Becoming-A-Better-Developer-Part-1-Of-Infinity.aspx">Benefits of Reading code</a> became clear the deeper we went through the NServiceBus code base, the more you understand how each piece interacts with the other to provide a great framework. Despite all the hurdles L2S provided it was worth the effort. What must be said for NServiceBus is that it is highly extensible already evidenced by its existing OOB support for 4 IOC frameworks, now 3 ORM’s and in the future with version 2.1 it will support a whole raft of Queued Transports.</p>
<p><a href="http://www.addtoany.com/add_to/delicious?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2009%2F12%2F09%2Flessons-learned-from-building-a-linq-to-sql-saga-persister%2F&amp;linkname=Lessons%20Learned%20from%20building%20a%20Linq%20To%20Sql%20Saga%20Persister" title="Delicious" rel="nofollow" target="_blank"><img src="http://www.markharris.net.au/blog/wp-content/plugins/add-to-any/icons/delicious.png" width="16" height="16" alt="Delicious"/></a> <a href="http://www.addtoany.com/add_to/google_reader?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2009%2F12%2F09%2Flessons-learned-from-building-a-linq-to-sql-saga-persister%2F&amp;linkname=Lessons%20Learned%20from%20building%20a%20Linq%20To%20Sql%20Saga%20Persister" title="Google Reader" rel="nofollow" target="_blank"><img src="http://www.markharris.net.au/blog/wp-content/plugins/add-to-any/icons/reader.png" width="16" height="16" alt="Google Reader"/></a> <a href="http://www.addtoany.com/add_to/twitter?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2009%2F12%2F09%2Flessons-learned-from-building-a-linq-to-sql-saga-persister%2F&amp;linkname=Lessons%20Learned%20from%20building%20a%20Linq%20To%20Sql%20Saga%20Persister" title="Twitter" rel="nofollow" target="_blank"><img src="http://www.markharris.net.au/blog/wp-content/plugins/add-to-any/icons/twitter.png" width="16" height="16" alt="Twitter"/></a> <a href="http://www.addtoany.com/add_to/facebook?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2009%2F12%2F09%2Flessons-learned-from-building-a-linq-to-sql-saga-persister%2F&amp;linkname=Lessons%20Learned%20from%20building%20a%20Linq%20To%20Sql%20Saga%20Persister" title="Facebook" rel="nofollow" target="_blank"><img src="http://www.markharris.net.au/blog/wp-content/plugins/add-to-any/icons/facebook.png" width="16" height="16" alt="Facebook"/></a> <a href="http://www.addtoany.com/add_to/friendfeed?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2009%2F12%2F09%2Flessons-learned-from-building-a-linq-to-sql-saga-persister%2F&amp;linkname=Lessons%20Learned%20from%20building%20a%20Linq%20To%20Sql%20Saga%20Persister" title="FriendFeed" rel="nofollow" target="_blank"><img src="http://www.markharris.net.au/blog/wp-content/plugins/add-to-any/icons/friendfeed.png" width="16" height="16" alt="FriendFeed"/></a> <a href="http://www.addtoany.com/add_to/linkedin?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2009%2F12%2F09%2Flessons-learned-from-building-a-linq-to-sql-saga-persister%2F&amp;linkname=Lessons%20Learned%20from%20building%20a%20Linq%20To%20Sql%20Saga%20Persister" title="LinkedIn" rel="nofollow" target="_blank"><img src="http://www.markharris.net.au/blog/wp-content/plugins/add-to-any/icons/linkedin.png" width="16" height="16" alt="LinkedIn"/></a> <a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2009%2F12%2F09%2Flessons-learned-from-building-a-linq-to-sql-saga-persister%2F&amp;linkname=Lessons%20Learned%20from%20building%20a%20Linq%20To%20Sql%20Saga%20Persister">Share/Save</a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.markharris.net.au/blog/2009/12/09/lessons-learned-from-building-a-linq-to-sql-saga-persister/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Service Broker &#8211; Some thoughts post hoc</title>
		<link>http://www.markharris.net.au/blog/2009/12/01/service-broker-some-thoughts-post-hoc/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=service-broker-some-thoughts-post-hoc</link>
		<comments>http://www.markharris.net.au/blog/2009/12/01/service-broker-some-thoughts-post-hoc/#comments</comments>
		<pubDate>Mon, 30 Nov 2009 15:22:24 +0000</pubDate>
		<dc:creator>Mark Harris</dc:creator>
				<category><![CDATA[.net]]></category>
		<category><![CDATA[Architecture]]></category>
		<category><![CDATA[NServiceBus]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[servicebroker]]></category>

		<guid isPermaLink="false">http://www.markharris.net.au/blog/?p=181</guid>
		<description><![CDATA[This post has been sitting in my drafts for a while. After my day today i felt that it was best that i put my thoughts about service broker down. In a project that i worked on about 2 years ago Service Broker was used as part of the system to perform data validation.&#160; If [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.markharris.net.au/blog/wp-content/uploads/2009/12/servicebroker.gif"><img style="border-bottom: 0px; border-left: 0px; display: inline; margin-left: 0px; border-top: 0px; margin-right: 0px; border-right: 0px" title="service broker" border="0" alt="sql service broker" align="left" src="http://www.markharris.net.au/blog/wp-content/uploads/2009/12/servicebroker_thumb.gif" width="178" height="167" /></a> </p>
<p>This post has been sitting in my drafts for a while. After my day today i felt that it was best that i put my thoughts about service broker down.    <br />In a project that i worked on about 2 years ago Service Broker was used as part of the system to perform data validation.&#160; If success was measured by the amount of time that a system has been in production without major issues then i can say that it was successful. </p>
<p>But if a system was to be judged by how much of a pain it is to maintain then l must say that its was not a <strike>glowing</strike> success. Below is a list of things that i found as good or bad about it. </p>
<p><strong>&#160;</strong></p>
<p><strong>Bad things</strong></p>
<ol>
<li>Limited information on the internet </li>
<li>Testing is extremely hard (compromises everywhere) </li>
<li>Troubleshooting is a pain </li>
<li>It could stop working and you may never know, (if using a fire and forget mechanism) </li>
<li>Poison messages disable queues (would have been nicer if it moved the message to a error queue) </li>
</ol>
<p><strong>Good things</strong></p>
<ol>
<li>Its Asynchronous </li>
<li>Its Asynchronous </li>
<li>Its Asynchronous </li>
</ol>
<p>Yes this list is one sided but true. The question that is important though is</p>
<p><strong>Would i use Service Broker again?</strong></p>
<p>The answer to that question is strangely YES. Only in very specific circumstances where system is ok with not having some data loss because of queue being disabled</p>
<p><strong>What would I use instead?</strong></p>
<p><strong><a href="http://www.nservicebus.com/" rel="tag">NServiceBus</a> </strong>of course. It provides an answer to all the negatives of service broker and is still asynchronous. </p>
<p><a href="http://www.addtoany.com/add_to/delicious?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2009%2F12%2F01%2Fservice-broker-some-thoughts-post-hoc%2F&amp;linkname=Service%20Broker%20%26%238211%3B%20Some%20thoughts%20post%20hoc" title="Delicious" rel="nofollow" target="_blank"><img src="http://www.markharris.net.au/blog/wp-content/plugins/add-to-any/icons/delicious.png" width="16" height="16" alt="Delicious"/></a> <a href="http://www.addtoany.com/add_to/google_reader?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2009%2F12%2F01%2Fservice-broker-some-thoughts-post-hoc%2F&amp;linkname=Service%20Broker%20%26%238211%3B%20Some%20thoughts%20post%20hoc" title="Google Reader" rel="nofollow" target="_blank"><img src="http://www.markharris.net.au/blog/wp-content/plugins/add-to-any/icons/reader.png" width="16" height="16" alt="Google Reader"/></a> <a href="http://www.addtoany.com/add_to/twitter?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2009%2F12%2F01%2Fservice-broker-some-thoughts-post-hoc%2F&amp;linkname=Service%20Broker%20%26%238211%3B%20Some%20thoughts%20post%20hoc" title="Twitter" rel="nofollow" target="_blank"><img src="http://www.markharris.net.au/blog/wp-content/plugins/add-to-any/icons/twitter.png" width="16" height="16" alt="Twitter"/></a> <a href="http://www.addtoany.com/add_to/facebook?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2009%2F12%2F01%2Fservice-broker-some-thoughts-post-hoc%2F&amp;linkname=Service%20Broker%20%26%238211%3B%20Some%20thoughts%20post%20hoc" title="Facebook" rel="nofollow" target="_blank"><img src="http://www.markharris.net.au/blog/wp-content/plugins/add-to-any/icons/facebook.png" width="16" height="16" alt="Facebook"/></a> <a href="http://www.addtoany.com/add_to/friendfeed?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2009%2F12%2F01%2Fservice-broker-some-thoughts-post-hoc%2F&amp;linkname=Service%20Broker%20%26%238211%3B%20Some%20thoughts%20post%20hoc" title="FriendFeed" rel="nofollow" target="_blank"><img src="http://www.markharris.net.au/blog/wp-content/plugins/add-to-any/icons/friendfeed.png" width="16" height="16" alt="FriendFeed"/></a> <a href="http://www.addtoany.com/add_to/linkedin?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2009%2F12%2F01%2Fservice-broker-some-thoughts-post-hoc%2F&amp;linkname=Service%20Broker%20%26%238211%3B%20Some%20thoughts%20post%20hoc" title="LinkedIn" rel="nofollow" target="_blank"><img src="http://www.markharris.net.au/blog/wp-content/plugins/add-to-any/icons/linkedin.png" width="16" height="16" alt="LinkedIn"/></a> <a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2009%2F12%2F01%2Fservice-broker-some-thoughts-post-hoc%2F&amp;linkname=Service%20Broker%20%26%238211%3B%20Some%20thoughts%20post%20hoc">Share/Save</a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.markharris.net.au/blog/2009/12/01/service-broker-some-thoughts-post-hoc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Every developer must read</title>
		<link>http://www.markharris.net.au/blog/2008/10/14/every-developer-must-read/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=every-developer-must-read</link>
		<comments>http://www.markharris.net.au/blog/2008/10/14/every-developer-must-read/#comments</comments>
		<pubDate>Tue, 14 Oct 2008 11:28:40 +0000</pubDate>
		<dc:creator>Mark Harris</dc:creator>
				<category><![CDATA[Architecture]]></category>

		<guid isPermaLink="false">http://www.markharris.net.au/blog/2008/10/14/every-developer-must-read/</guid>
		<description><![CDATA[Last month I ordered Jimmy Nilsson’s book Applying Domain Drive Design and Patterns along with a couple of others including Patterns of Enterprise Application Architecture, they arrived about a 2 weeks ago. Finally this week I have started to read ADDP and have been struggling to put it down to do anything else. IMHO this [...]]]></description>
			<content:encoded><![CDATA[<p>Last month I ordered Jimmy Nilsson’s book Applying Domain Drive Design and Patterns along with a couple of others including Patterns of Enterprise Application Architecture, they arrived about a 2 weeks ago. </p>
<p><img style="display: inline" align="right" src="http://ecx.images-amazon.com/images/I/51sbuQIxz9L._SS500_.jpg" width="258" height="258" /></p>
<p>Finally this week I have started to read ADDP and have been struggling to put it down to do anything else. IMHO this is one of the best Technical books ever written. As a newbie to DDD there is no better starting point than with this book. </p>
<p>Jimmy’s style of writing is very easy to read and understand. The content of course is brilliant, I have just finished reading chapter 2 and feel a few years wiser.</p>
<p>My advice to any developer looking for enlightenment is to read Jimmy’s book. Perfecting the use of Domain Driven Design is not something that comes easy. Even in the smallest application the value of using it is immense. I have a long way to go to become a good developer, and reading this book is going to be a big help in that process.</p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:5cd7c04a-3cbb-4663-8669-aa888ddae0a6" class="wlWriterEditableSmartContent">Technorati Tags: <a href="http://technorati.com/tags/domain+driven+design" rel="tag">domain driven design</a></div>
<p><a href="http://www.addtoany.com/add_to/delicious?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2008%2F10%2F14%2Fevery-developer-must-read%2F&amp;linkname=Every%20developer%20must%20read" title="Delicious" rel="nofollow" target="_blank"><img src="http://www.markharris.net.au/blog/wp-content/plugins/add-to-any/icons/delicious.png" width="16" height="16" alt="Delicious"/></a> <a href="http://www.addtoany.com/add_to/google_reader?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2008%2F10%2F14%2Fevery-developer-must-read%2F&amp;linkname=Every%20developer%20must%20read" title="Google Reader" rel="nofollow" target="_blank"><img src="http://www.markharris.net.au/blog/wp-content/plugins/add-to-any/icons/reader.png" width="16" height="16" alt="Google Reader"/></a> <a href="http://www.addtoany.com/add_to/twitter?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2008%2F10%2F14%2Fevery-developer-must-read%2F&amp;linkname=Every%20developer%20must%20read" title="Twitter" rel="nofollow" target="_blank"><img src="http://www.markharris.net.au/blog/wp-content/plugins/add-to-any/icons/twitter.png" width="16" height="16" alt="Twitter"/></a> <a href="http://www.addtoany.com/add_to/facebook?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2008%2F10%2F14%2Fevery-developer-must-read%2F&amp;linkname=Every%20developer%20must%20read" title="Facebook" rel="nofollow" target="_blank"><img src="http://www.markharris.net.au/blog/wp-content/plugins/add-to-any/icons/facebook.png" width="16" height="16" alt="Facebook"/></a> <a href="http://www.addtoany.com/add_to/friendfeed?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2008%2F10%2F14%2Fevery-developer-must-read%2F&amp;linkname=Every%20developer%20must%20read" title="FriendFeed" rel="nofollow" target="_blank"><img src="http://www.markharris.net.au/blog/wp-content/plugins/add-to-any/icons/friendfeed.png" width="16" height="16" alt="FriendFeed"/></a> <a href="http://www.addtoany.com/add_to/linkedin?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2008%2F10%2F14%2Fevery-developer-must-read%2F&amp;linkname=Every%20developer%20must%20read" title="LinkedIn" rel="nofollow" target="_blank"><img src="http://www.markharris.net.au/blog/wp-content/plugins/add-to-any/icons/linkedin.png" width="16" height="16" alt="LinkedIn"/></a> <a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2008%2F10%2F14%2Fevery-developer-must-read%2F&amp;linkname=Every%20developer%20must%20read">Share/Save</a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.markharris.net.au/blog/2008/10/14/every-developer-must-read/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Microsoft Distributed Application Server aka Dublin</title>
		<link>http://www.markharris.net.au/blog/2008/10/02/microsoft-distributed-application-server-aka-dublin/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=microsoft-distributed-application-server-aka-dublin</link>
		<comments>http://www.markharris.net.au/blog/2008/10/02/microsoft-distributed-application-server-aka-dublin/#comments</comments>
		<pubDate>Wed, 01 Oct 2008 16:22:18 +0000</pubDate>
		<dc:creator>Mark Harris</dc:creator>
				<category><![CDATA[Architecture]]></category>
		<category><![CDATA[Oslo]]></category>
		<category><![CDATA[.net]]></category>
		<category><![CDATA[.net4]]></category>
		<category><![CDATA[wcf]]></category>
		<category><![CDATA[wf]]></category>

		<guid isPermaLink="false">http://www.markharris.net.au/blog/2008/10/02/microsoft-distributed-application-server-aka-dublin/</guid>
		<description><![CDATA[Mary-Jo shares some of her insight into some of the news around Oslo that may be announced around PDC 08. What interests me is that in my last post I speculated that the Process Server could be some sort of service bus implementation, which seems to be spot on. Yes “Dublin” is the code name [...]]]></description>
			<content:encoded><![CDATA[<p><a target="_blank" href="http://blogs.zdnet.com/microsoft/?p=1614">Mary-Jo shares some of her insight into some of the news around Oslo</a> that may be announced around PDC 08. What interests me is that in my last post I speculated that the Process Server could be some sort of service bus implementation, which seems to be spot on. Yes “<a target="_blank" href="http://developers.de/blogs/andreas_erben/archive/2008/09/17/codename-quot-dublin-quot-microsoft-s-distributed-application-server.aspx">Dublin</a>” is the code name for Microsoft’s Distributed Application Server, but hey is that not just a fancy name for <a target="_blank" href="http://www.nservicebus.com/" rel="tag">NServiceBus</a> or <a target="_blank" href="http://code.google.com/p/masstransit/" rel="tag">Mass Transit</a>.</p>
<p>I guess when PDC rolls around in a few weeks and more news around what Oslo is and when the bits roll out to developers and architects to see, touch, feel and smell what the CSD and Dev Division guys have come up with is when the real questions need to be asked. All well and good to speculate, I just hope that some parts of the Oslo effort will touch on some of my <a target="_blank" href="http://www.markharris.net.au/blog/2008/09/23/oslo-more-news-and-predictions/">desires</a>.</p>
<p>&#160;</p>
<p><strong>UPDATE:</strong>  <a href="http://mtaulty.com/CommunityServer/blogs/mike_taultys_blog/archive/2008/10/01/10797.aspx">Mike Taulty has posted links to a whitepaper and a screencast that explain more details about .net 4.0</a> </p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:a31cb582-c54f-47e1-9ed4-6f45beac6fa8" class="wlWriterEditableSmartContent">Technorati Tags: <a href="http://technorati.com/tags/wcf" rel="tag">wcf</a>,<a href="http://technorati.com/tags/wf" rel="tag">wf</a>,<a href="http://technorati.com/tags/oslo" rel="tag">oslo</a>,<a href="http://technorati.com/tags/.net4" rel="tag">.net4</a>,<a href="http://technorati.com/tags/.net" rel="tag">.net</a></div>
<p><a href="http://www.addtoany.com/add_to/delicious?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2008%2F10%2F02%2Fmicrosoft-distributed-application-server-aka-dublin%2F&amp;linkname=Microsoft%20Distributed%20Application%20Server%20aka%20Dublin" title="Delicious" rel="nofollow" target="_blank"><img src="http://www.markharris.net.au/blog/wp-content/plugins/add-to-any/icons/delicious.png" width="16" height="16" alt="Delicious"/></a> <a href="http://www.addtoany.com/add_to/google_reader?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2008%2F10%2F02%2Fmicrosoft-distributed-application-server-aka-dublin%2F&amp;linkname=Microsoft%20Distributed%20Application%20Server%20aka%20Dublin" title="Google Reader" rel="nofollow" target="_blank"><img src="http://www.markharris.net.au/blog/wp-content/plugins/add-to-any/icons/reader.png" width="16" height="16" alt="Google Reader"/></a> <a href="http://www.addtoany.com/add_to/twitter?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2008%2F10%2F02%2Fmicrosoft-distributed-application-server-aka-dublin%2F&amp;linkname=Microsoft%20Distributed%20Application%20Server%20aka%20Dublin" title="Twitter" rel="nofollow" target="_blank"><img src="http://www.markharris.net.au/blog/wp-content/plugins/add-to-any/icons/twitter.png" width="16" height="16" alt="Twitter"/></a> <a href="http://www.addtoany.com/add_to/facebook?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2008%2F10%2F02%2Fmicrosoft-distributed-application-server-aka-dublin%2F&amp;linkname=Microsoft%20Distributed%20Application%20Server%20aka%20Dublin" title="Facebook" rel="nofollow" target="_blank"><img src="http://www.markharris.net.au/blog/wp-content/plugins/add-to-any/icons/facebook.png" width="16" height="16" alt="Facebook"/></a> <a href="http://www.addtoany.com/add_to/friendfeed?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2008%2F10%2F02%2Fmicrosoft-distributed-application-server-aka-dublin%2F&amp;linkname=Microsoft%20Distributed%20Application%20Server%20aka%20Dublin" title="FriendFeed" rel="nofollow" target="_blank"><img src="http://www.markharris.net.au/blog/wp-content/plugins/add-to-any/icons/friendfeed.png" width="16" height="16" alt="FriendFeed"/></a> <a href="http://www.addtoany.com/add_to/linkedin?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2008%2F10%2F02%2Fmicrosoft-distributed-application-server-aka-dublin%2F&amp;linkname=Microsoft%20Distributed%20Application%20Server%20aka%20Dublin" title="LinkedIn" rel="nofollow" target="_blank"><img src="http://www.markharris.net.au/blog/wp-content/plugins/add-to-any/icons/linkedin.png" width="16" height="16" alt="LinkedIn"/></a> <a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2008%2F10%2F02%2Fmicrosoft-distributed-application-server-aka-dublin%2F&amp;linkname=Microsoft%20Distributed%20Application%20Server%20aka%20Dublin">Share/Save</a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.markharris.net.au/blog/2008/10/02/microsoft-distributed-application-server-aka-dublin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Oslo &#8211; More news and predictions</title>
		<link>http://www.markharris.net.au/blog/2008/09/23/oslo-more-news-and-predictions/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=oslo-more-news-and-predictions</link>
		<comments>http://www.markharris.net.au/blog/2008/09/23/oslo-more-news-and-predictions/#comments</comments>
		<pubDate>Mon, 22 Sep 2008 14:22:26 +0000</pubDate>
		<dc:creator>Mark Harris</dc:creator>
				<category><![CDATA[.net]]></category>
		<category><![CDATA[Architecture]]></category>
		<category><![CDATA[Oslo]]></category>
		<category><![CDATA[.net4]]></category>
		<category><![CDATA[soa]]></category>
		<category><![CDATA[wcf]]></category>
		<category><![CDATA[wf]]></category>

		<guid isPermaLink="false">http://www.markharris.net.au/blog/2008/09/23/oslo-more-news-and-predictions/</guid>
		<description><![CDATA[A few weeks back I took a guess at “What is Oslo?”in that post I suggested the following I imagine it to be a tool that enables these Information Workers to use some of Oslo’s features much like using Visio, but instead of static elements there are dynamic objects drawn from the repository that perform [...]]]></description>
			<content:encoded><![CDATA[<p>A few weeks back <a rel="tag" href="http://www.markharris.net.au/blog/2008/09/08/what-is-oslo/">I took a guess at “What is Oslo?”</a>in that post I suggested the following</p>
<blockquote><p>I imagine it to be a tool that enables these Information Workers to use some of Oslo’s features much like using Visio, but instead of static elements there are dynamic objects drawn from the repository that perform a specific business purpose, when put together by the domain expert enables them to perform a task that would have required a developer to perform otherwise.</p></blockquote>
<p>As it turns out I may not be that far from the truth, or some part of it. Ron Jacobs interviewed David Chappell at Tech.Ed just past and in that conversation David divulges a few interesting bit of information.</p>
<p>Two things that caught my attention was the “Lifecycle Manager” and the “Process Server&#8221;.  But here are my two predictions about what these two things could be. (Yes I am going out on a limb)</p>
<p>The Lifecycle Manager – A long running workflow or <a href="http://en.wikipedia.org/wiki/Long-running_transaction">Saga</a> manager.</p>
<p>The Process Server – A <a href="http://en.wikipedia.org/wiki/Enterprise_service_bus">Service Bus</a> implementation.</p>
<p>The video  of Ron Jacobs and David Chappell along with David’s loose timeline/ roadmap to Oslo is after the Jump<span id="more-63"></span></p>
<p> </p>
<p align="center"><iframe height="325" src="http://channel9.msdn.com/posts/rojacobs/422315/player/" frameborder="0" width="320" scrolling="no"></iframe> <br /><a href="http://channel9.msdn.com/posts/rojacobs/endpointtv-The-Road-to-Oslo/">endpoint.tv &#8211; The Road to &quot;Oslo&quot;</a> </p>
<p> </p>
<p>Thanks to <a href="http://startbigthinksmall.wordpress.com/2008/09/19/dsl-tools-software-factories-and-oslo-model-driven-the-microsoftnet-way/">Lars Corneliussen</a> for the following</p>
<blockquote><p>David Chappel also described the <strong>release roadmap</strong>, but without confirming any exact dates:</p>
<ol>
<li><strong>A CTP Release around PDC (October 27?)</strong><br />
He didn’t say what that will include.</li>
<li>New Workflow Foundation with .NET 4 and a new Visual Studio version</li>
<li>The repository including the modeling language and its visual editor + a first part of the process server</li>
<li>A more complete version of the process server, including lifecycle manager (whatever that means)</li>
</ol>
<p>There is nothing left but waiting for the <a href="http://www.microsoftpdc.com">PDC</a> in October. So see you there!</p>
<p> </p></blockquote>
<div id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:fb8de9aa-2de4-486b-997b-a7b974a260e1" class="wlWriterEditableSmartContent" style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px">Technorati Tags: <a rel="tag" href="http://technorati.com/tags/.net4">.net4</a>,<a rel="tag" href="http://technorati.com/tags/Oslo">Oslo</a>,<a rel="tag" href="http://technorati.com/tags/soa">soa</a>,<a rel="tag" href="http://technorati.com/tags/wcf">wcf</a>,<a rel="tag" href="http://technorati.com/tags/wf">wf</a></div>
<p><a href="http://www.addtoany.com/add_to/delicious?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2008%2F09%2F23%2Foslo-more-news-and-predictions%2F&amp;linkname=Oslo%20%26ndash%3B%20More%20news%20and%20predictions" title="Delicious" rel="nofollow" target="_blank"><img src="http://www.markharris.net.au/blog/wp-content/plugins/add-to-any/icons/delicious.png" width="16" height="16" alt="Delicious"/></a> <a href="http://www.addtoany.com/add_to/google_reader?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2008%2F09%2F23%2Foslo-more-news-and-predictions%2F&amp;linkname=Oslo%20%26ndash%3B%20More%20news%20and%20predictions" title="Google Reader" rel="nofollow" target="_blank"><img src="http://www.markharris.net.au/blog/wp-content/plugins/add-to-any/icons/reader.png" width="16" height="16" alt="Google Reader"/></a> <a href="http://www.addtoany.com/add_to/twitter?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2008%2F09%2F23%2Foslo-more-news-and-predictions%2F&amp;linkname=Oslo%20%26ndash%3B%20More%20news%20and%20predictions" title="Twitter" rel="nofollow" target="_blank"><img src="http://www.markharris.net.au/blog/wp-content/plugins/add-to-any/icons/twitter.png" width="16" height="16" alt="Twitter"/></a> <a href="http://www.addtoany.com/add_to/facebook?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2008%2F09%2F23%2Foslo-more-news-and-predictions%2F&amp;linkname=Oslo%20%26ndash%3B%20More%20news%20and%20predictions" title="Facebook" rel="nofollow" target="_blank"><img src="http://www.markharris.net.au/blog/wp-content/plugins/add-to-any/icons/facebook.png" width="16" height="16" alt="Facebook"/></a> <a href="http://www.addtoany.com/add_to/friendfeed?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2008%2F09%2F23%2Foslo-more-news-and-predictions%2F&amp;linkname=Oslo%20%26ndash%3B%20More%20news%20and%20predictions" title="FriendFeed" rel="nofollow" target="_blank"><img src="http://www.markharris.net.au/blog/wp-content/plugins/add-to-any/icons/friendfeed.png" width="16" height="16" alt="FriendFeed"/></a> <a href="http://www.addtoany.com/add_to/linkedin?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2008%2F09%2F23%2Foslo-more-news-and-predictions%2F&amp;linkname=Oslo%20%26ndash%3B%20More%20news%20and%20predictions" title="LinkedIn" rel="nofollow" target="_blank"><img src="http://www.markharris.net.au/blog/wp-content/plugins/add-to-any/icons/linkedin.png" width="16" height="16" alt="LinkedIn"/></a> <a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2008%2F09%2F23%2Foslo-more-news-and-predictions%2F&amp;linkname=Oslo%20%26ndash%3B%20More%20news%20and%20predictions">Share/Save</a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.markharris.net.au/blog/2008/09/23/oslo-more-news-and-predictions/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>.net Framework 4.0</title>
		<link>http://www.markharris.net.au/blog/2008/09/08/net-framework-40/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=net-framework-40</link>
		<comments>http://www.markharris.net.au/blog/2008/09/08/net-framework-40/#comments</comments>
		<pubDate>Sun, 07 Sep 2008 23:59:28 +0000</pubDate>
		<dc:creator>Mark Harris</dc:creator>
				<category><![CDATA[.net]]></category>
		<category><![CDATA[Oslo]]></category>
		<category><![CDATA[.net4]]></category>
		<category><![CDATA[wcf]]></category>
		<category><![CDATA[wf]]></category>

		<guid isPermaLink="false">http://www.markharris.net.au/blog/2008/09/08/net-framework-40/</guid>
		<description><![CDATA[Based on Kavita and Wenlong’s posts (they work with Doug Purdy and Don Box) the .net framework v4 is going to be the building blocks for Oslo. With .net 4 they are not touting it to be a additive release like 3.0 and 3.5.&#160; Wenlog says that 4.0 will be the next major release since [...]]]></description>
			<content:encoded><![CDATA[<p>Based on <a href="http://blogs.msdn.com/kavitak/archive/2008/09/06/oslo-the-silence-explained.aspx">Kavita</a> and <a href="http://blogs.msdn.com/wenlong/archive/2008/09/07/net-4-0-wf-wcf-and-oslo.aspx">Wenlong</a>’s posts (they work with Doug Purdy and Don Box) the .net framework v4 is going to be the building blocks for Oslo. </p>
<p>With .net 4 they are not touting it to be a additive release like 3.0 and 3.5.&#160; <a href="http://blogs.msdn.com/wenlong/">Wenlog</a> says that 4.0 will be the next major release since 2.0, </p>
<ul>
<li>Major improvements for WCF and WF </li>
<li>Built in dynamic language support </li>
<li>adding support for a new language (dynamic) for Oslo’s “model driven” programming </li>
</ul>
<p>But to get the full picture we are going to have to wait for PDC, when the first CTP bits should be available. I can only predict exciting times ahead, as always more things to learn, I guess its time to open <a href="http://www.strangelights.com/blog/">Robert Pickering’s</a> book <a href="http://www.amazon.com/dp/1590597575?tag=strangelights-20&amp;camp=14573&amp;creative=327641&amp;linkCode=as1&amp;creativeASIN=1590597575&amp;adid=1BCS20N57D06KSADPPQ4&amp;" rel="tag">Foundations of F#</a></p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:5c3b498a-6b3f-407c-bc5f-b3157b7dc2de" class="wlWriterSmartContent">Technorati Tags: <a href="http://technorati.com/tags/.net4" rel="tag">.net4</a>,<a href="http://technorati.com/tags/WF" rel="tag">WF</a>,<a href="http://technorati.com/tags/WCF" rel="tag">WCF</a>,<a href="http://technorati.com/tags/Oslo" rel="tag">Oslo</a>,<a href="http://technorati.com/tags/.net" rel="tag">.net</a></div>
<p><a href="http://www.addtoany.com/add_to/delicious?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2008%2F09%2F08%2Fnet-framework-40%2F&amp;linkname=.net%20Framework%204.0" title="Delicious" rel="nofollow" target="_blank"><img src="http://www.markharris.net.au/blog/wp-content/plugins/add-to-any/icons/delicious.png" width="16" height="16" alt="Delicious"/></a> <a href="http://www.addtoany.com/add_to/google_reader?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2008%2F09%2F08%2Fnet-framework-40%2F&amp;linkname=.net%20Framework%204.0" title="Google Reader" rel="nofollow" target="_blank"><img src="http://www.markharris.net.au/blog/wp-content/plugins/add-to-any/icons/reader.png" width="16" height="16" alt="Google Reader"/></a> <a href="http://www.addtoany.com/add_to/twitter?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2008%2F09%2F08%2Fnet-framework-40%2F&amp;linkname=.net%20Framework%204.0" title="Twitter" rel="nofollow" target="_blank"><img src="http://www.markharris.net.au/blog/wp-content/plugins/add-to-any/icons/twitter.png" width="16" height="16" alt="Twitter"/></a> <a href="http://www.addtoany.com/add_to/facebook?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2008%2F09%2F08%2Fnet-framework-40%2F&amp;linkname=.net%20Framework%204.0" title="Facebook" rel="nofollow" target="_blank"><img src="http://www.markharris.net.au/blog/wp-content/plugins/add-to-any/icons/facebook.png" width="16" height="16" alt="Facebook"/></a> <a href="http://www.addtoany.com/add_to/friendfeed?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2008%2F09%2F08%2Fnet-framework-40%2F&amp;linkname=.net%20Framework%204.0" title="FriendFeed" rel="nofollow" target="_blank"><img src="http://www.markharris.net.au/blog/wp-content/plugins/add-to-any/icons/friendfeed.png" width="16" height="16" alt="FriendFeed"/></a> <a href="http://www.addtoany.com/add_to/linkedin?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2008%2F09%2F08%2Fnet-framework-40%2F&amp;linkname=.net%20Framework%204.0" title="LinkedIn" rel="nofollow" target="_blank"><img src="http://www.markharris.net.au/blog/wp-content/plugins/add-to-any/icons/linkedin.png" width="16" height="16" alt="LinkedIn"/></a> <a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2008%2F09%2F08%2Fnet-framework-40%2F&amp;linkname=.net%20Framework%204.0">Share/Save</a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.markharris.net.au/blog/2008/09/08/net-framework-40/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What is Oslo?</title>
		<link>http://www.markharris.net.au/blog/2008/09/08/what-is-oslo/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=what-is-oslo</link>
		<comments>http://www.markharris.net.au/blog/2008/09/08/what-is-oslo/#comments</comments>
		<pubDate>Sun, 07 Sep 2008 23:37:04 +0000</pubDate>
		<dc:creator>Mark Harris</dc:creator>
				<category><![CDATA[.net]]></category>
		<category><![CDATA[Architecture]]></category>
		<category><![CDATA[Oslo]]></category>
		<category><![CDATA[.net4]]></category>
		<category><![CDATA[wcf]]></category>
		<category><![CDATA[wf]]></category>

		<guid isPermaLink="false">http://www.markharris.net.au/blog/2008/09/08/what-is-oslo/</guid>
		<description><![CDATA[Oslo has been shrouded in a lot of mystery. Most information on the about Oslo is still speculation. When people think Oslo they think Biztalk V Next Emacs.net Microsoft ESB All of the above and more… IMHO I believe it to be everything and more, but what proof did i have to support it? Well [...]]]></description>
			<content:encoded><![CDATA[<p>Oslo has been shrouded in a lot of mystery. Most information on the about Oslo is still speculation. When people think Oslo they think</p>
<ul>
<li>Biztalk V Next</li>
<li>Emacs.net</li>
<li>Microsoft ESB</li>
<li>All of the above and more…</li>
</ul>
<p>IMHO I believe it to be everything and more, but what proof did i have to support it? Well Doug Purdy announced on his blog about hiring for <a href="http://www.douglasp.com/blog/2007/12/27/EmacsNet.aspx" rel="tag">Emacs.net</a> This raises the question of why another IDE/Text Editor when Visual Studio is very powerful, unless you have tried working with XAML. I digress. </p>
<p>Last night there was posts from <a target="_blank" href="http://douglaspurdy.com/2008/09/06/what-is-oslo/">Doug Purdy</a> and <a target="_blank" href="http://www.pluralsight.com/community/blogs/dbox/archive/2008/09/06/oslo.aspx">Don Box</a> that began to unveil bits of what make Oslo. </p>
<p>Doug Describes it as three simple things.</p>
<blockquote><ul>
<li>A <b>tool</b> that helps people define and interact with models in a rich and visual manner </li>
<li>A <b>language</b> that helps people create and use textual domain-specific languages and data models </li>
<li>A relational <b>repository </b>that makes models available to both tools and platform components </li>
</ul>
</blockquote>
<p>and Don says that Olso is being created with a couple of intentions </p>
<blockquote><p>1. We’re making it easier for people to write things down in ways that make sense for the domain they are working in – the common term for this in the wild is modeling.</p>
<p>2. We’re making the things people wrote down accessible to platform components during program execution.</p>
</blockquote>
<p>&#160;</p>
<p>Based on this I would take a punt and say that Oslo is going to create a platform for developers to create DSL’s that will be stored in a repository, this DSL is then retrieved and consumed by a visual tool to create on the fly mash-ups of their domain. The key part here is that the visual tool will be something that can be used by Information Workers, Business Analysts, and Project Consultants. </p>
<p>I imagine it to be a tool that enables these Information Workers to use some of Oslo’s features much like using Visio, but instead of static elements there are dynamic objects drawn from the repository that perform a specific business purpose, when put together by the domain expert enables them to perform a task that would have required a developer to perform otherwise. </p>
<p>This is something that is peeking my interest. Wow I can imagine every medium to large business needing something like this. I cant wait for PDC anymore, I just wish I could be there, then again that&#8217;s what a Webcast is for.</p>
<p>Doug calls this the “end of the beginning” of his vision of enabling everyone to be a programmer if they can pull something like this of then he may be correct. But I will wait and hold my judgement till I can play with the Bits that should be available at <a target="_blank" href="http://microsoftpdc.com/" rel="tag">PDC08</a></p>
<p>&#160;</p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:5f3fa8f6-ae58-4ad2-900c-ec66813ba259" class="wlWriterSmartContent">Technorati Tags: <a href="http://technorati.com/tags/oslo" rel="tag">oslo</a>,<a href="http://technorati.com/tags/.net4" rel="tag">.net4</a>,<a href="http://technorati.com/tags/wcf" rel="tag">wcf</a>,<a href="http://technorati.com/tags/wf" rel="tag">wf</a>,<a href="http://technorati.com/tags/.net" rel="tag">.net</a></div>
<p><a href="http://www.addtoany.com/add_to/delicious?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2008%2F09%2F08%2Fwhat-is-oslo%2F&amp;linkname=What%20is%20Oslo%3F" title="Delicious" rel="nofollow" target="_blank"><img src="http://www.markharris.net.au/blog/wp-content/plugins/add-to-any/icons/delicious.png" width="16" height="16" alt="Delicious"/></a> <a href="http://www.addtoany.com/add_to/google_reader?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2008%2F09%2F08%2Fwhat-is-oslo%2F&amp;linkname=What%20is%20Oslo%3F" title="Google Reader" rel="nofollow" target="_blank"><img src="http://www.markharris.net.au/blog/wp-content/plugins/add-to-any/icons/reader.png" width="16" height="16" alt="Google Reader"/></a> <a href="http://www.addtoany.com/add_to/twitter?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2008%2F09%2F08%2Fwhat-is-oslo%2F&amp;linkname=What%20is%20Oslo%3F" title="Twitter" rel="nofollow" target="_blank"><img src="http://www.markharris.net.au/blog/wp-content/plugins/add-to-any/icons/twitter.png" width="16" height="16" alt="Twitter"/></a> <a href="http://www.addtoany.com/add_to/facebook?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2008%2F09%2F08%2Fwhat-is-oslo%2F&amp;linkname=What%20is%20Oslo%3F" title="Facebook" rel="nofollow" target="_blank"><img src="http://www.markharris.net.au/blog/wp-content/plugins/add-to-any/icons/facebook.png" width="16" height="16" alt="Facebook"/></a> <a href="http://www.addtoany.com/add_to/friendfeed?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2008%2F09%2F08%2Fwhat-is-oslo%2F&amp;linkname=What%20is%20Oslo%3F" title="FriendFeed" rel="nofollow" target="_blank"><img src="http://www.markharris.net.au/blog/wp-content/plugins/add-to-any/icons/friendfeed.png" width="16" height="16" alt="FriendFeed"/></a> <a href="http://www.addtoany.com/add_to/linkedin?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2008%2F09%2F08%2Fwhat-is-oslo%2F&amp;linkname=What%20is%20Oslo%3F" title="LinkedIn" rel="nofollow" target="_blank"><img src="http://www.markharris.net.au/blog/wp-content/plugins/add-to-any/icons/linkedin.png" width="16" height="16" alt="LinkedIn"/></a> <a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2008%2F09%2F08%2Fwhat-is-oslo%2F&amp;linkname=What%20is%20Oslo%3F">Share/Save</a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.markharris.net.au/blog/2008/09/08/what-is-oslo/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Service Broker C# Wrapper Interface and Transactions</title>
		<link>http://www.markharris.net.au/blog/2008/08/16/service-broker-c-wrapper-interface-and-transactions/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=service-broker-c-wrapper-interface-and-transactions</link>
		<comments>http://www.markharris.net.au/blog/2008/08/16/service-broker-c-wrapper-interface-and-transactions/#comments</comments>
		<pubDate>Sat, 16 Aug 2008 05:13:13 +0000</pubDate>
		<dc:creator>Mark Harris</dc:creator>
				<category><![CDATA[.net]]></category>
		<category><![CDATA[Architecture]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[dtc]]></category>
		<category><![CDATA[service broker]]></category>
		<category><![CDATA[transactions]]></category>

		<guid isPermaLink="false">http://www.markharris.net.au/blog/2008/08/16/service-broker-c-wrapper-interface-and-transactions/</guid>
		<description><![CDATA[Service Broker has a really good C# wrapper interface that comes part of the samples on Codeplex. If you need to work with service broker objects in the managed world then I would recommend using the interface from the Codeplex Service Broker Samples. Most samples I have seen demonstrate communicating within a single database, and [...]]]></description>
			<content:encoded><![CDATA[<p>Service Broker has a really good C# wrapper interface that comes part of the samples on <a href="http://www.codeplex.com/" target="_blank">Codeplex</a>. If you need to work with service broker objects in the managed world then I would recommend using the interface from the <a href="http://www.codeplex.com/MSFTSBProdSamples/Wiki/View.aspx?title=SS2008%21Readme_ServiceBrokerInterface&amp;referringTitle=Home " target="_blank" rel="tag">Codeplex Service Broker Samples</a>.</p>
<p>Most samples I have seen demonstrate communicating within a single database, and hence use the <a href="http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqltransaction.aspx" target="_blank">SqlTransaction Class</a> The code below is an example of sending a message to a SSB Service&#160; in a SqlTransaction. </p>
<div style="border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 97.2%; cursor: text; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, &#39;Courier New&#39;, courier, monospace; height: 257px; background-color: #f4f4f4">
<div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   1:</span> <span style="color: #0000ff">private</span> <span style="color: #0000ff">void</span> SendMsgToSSB()</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   2:</span> {</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   3:</span>     SqlConnection conn = <span style="color: #0000ff">null</span>;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   4:</span>     SqlTransaction tran = <span style="color: #0000ff">null</span>;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   5:</span>     Conversation dialog = <span style="color: #0000ff">null</span>;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   6:</span>     Service client = <span style="color: #0000ff">null</span>;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   7:</span>     <span style="color: #0000ff">string</span> connString = <span style="color: #006080">&quot;Persist Security Info = False; Integrated Security = True; Initial Catalog = MyServiceBrokerDB; Data Source = .; Connect Timeout = 30;&quot;</span></pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   8:</span>     <span style="color: #0000ff">try</span></pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   9:</span>     {</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  10:</span>         conn = <span style="color: #0000ff">new</span> SqlConnection(connString);</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  11:</span>         conn.Open();</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  12:</span>&#160; </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  13:</span>         <span style="color: #008000">// Begin a transaction</span></pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  14:</span>         tran = conn.BeginTransaction();</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  15:</span>&#160; </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  16:</span>         <span style="color: #008000">// Create a service object</span></pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  17:</span>         client = <span style="color: #0000ff">new</span> Service(<span style="color: #006080">&quot;MyCoolService&quot;</span>, conn, tran);</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  18:</span>         client.FetchSize = 1;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  19:</span>&#160; </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  20:</span>         <span style="color: #008000">// Begin a dialog with the MyCoolService</span></pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  21:</span>         dialog = client.BeginDialog(</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  22:</span>             <span style="color: #006080">&quot;MyCoolServiceTarget&quot;</span>, <span style="color: #0000ff">null</span>, <span style="color: #006080">&quot;DEFAULT&quot;</span>,</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  23:</span>             TimeSpan.FromMinutes(1), <span style="color: #0000ff">false</span>, conn, tran);</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  24:</span>&#160; </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  25:</span>         <span style="color: #008000">// Create request message</span></pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  26:</span>         <span style="color: #0000ff">string</span> outgoingBody = <span style="color: #006080">&quot;my really cool msg that broker understands&quot;</span>;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  27:</span>         Message request = <span style="color: #0000ff">new</span> Message(<span style="color: #006080">&quot;DEFAULT&quot;</span>,</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  28:</span>                                       <span style="color: #0000ff">new</span> MemoryStream(Encoding.UTF8.GetBytes(outgoingBody)));</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  29:</span>&#160; </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  30:</span>         <span style="color: #008000">// Send the message to the service</span></pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  31:</span>         dialog.Send(request, conn, tran);</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  32:</span>&#160; </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  33:</span>         dialog.End(conn, tran);</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  34:</span>         tran.Commit(); </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  35:</span>     }</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  36:</span>     <span style="color: #0000ff">catch</span> (ServiceException svcEx)</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  37:</span>     {<span style="color: #008000">//deal with this pesky service exceptions</span></pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  38:</span>     }</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  39:</span>     <span style="color: #0000ff">finally</span></pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  40:</span>     {<span style="color: #008000">//clean up here close connections etc.</span></pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  41:</span>     }</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  42:</span> }</pre>
</p></div>
</div>
<p>But in scenarios where the transaction needs to be elevated from a lightweight transaction to one that needs the aid of the DTC the SqlTransaction object is not going to cut it for you. </p>
<p>With a simple change (<strong><em>in bold and italicized</em></strong>) you can then support enlisting in a Distributed Transaction.</p>
<div style="border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, &#39;Courier New&#39;, courier, monospace; background-color: #f4f4f4">
<div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   1:</span> <span style="color: #0000ff">public</span> <span style="color: #0000ff">void</span> SendMsgToSSB()</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   2:</span> {</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   3:</span>     SqlConnection conn = <span style="color: #0000ff">null</span>;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   4:</span>     Conversation dialog = <span style="color: #0000ff">null</span>;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   5:</span>     Service client = <span style="color: #0000ff">null</span>;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   6:</span>     <span style="color: #0000ff">string</span> ConnectionString = <span style="color: #006080">&quot;Persist Security Info = False; Integrated Security = True; Initial Catalog = MyServiceBrokerDB; Data Source = .; Connect Timeout = 30;&quot;</span>;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   7:</span>     <span style="color: #0000ff">try</span></pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   8:</span>     {</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   9:</span>         conn = <span style="color: #0000ff">new</span> SqlConnection(ConnectionString);</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  10:</span>         <span style="color: #0000ff">if</span> (conn.State != ConnectionState.Open)</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  11:</span>         {</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  12:</span>             conn.Open();</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  13:</span>         }</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><font size="2"><strong><em><span style="color: #606060">  14:</span>         conn.EnlistTransaction(Transaction.Current);</em></strong></font></pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  15:</span>&#160; </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  16:</span>         <span style="color: #008000">// Create a service object</span></pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  17:</span>         client = <span style="color: #0000ff">new</span> Service(<span style="color: #006080">&quot;MyCoolService&quot;</span>, conn, <span style="color: #0000ff">null</span>);</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  18:</span>         client.FetchSize = 1;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  19:</span>&#160; </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  20:</span>         <span style="color: #008000">// Begin a dialog with the MyCoolService</span></pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  21:</span>         dialog = client.BeginDialog(</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  22:</span>             <span style="color: #006080">&quot;MyCoolServiceTarget&quot;</span>, <span style="color: #0000ff">null</span>, <span style="color: #006080">&quot;DEFAULT&quot;</span>,</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  23:</span>             TimeSpan.FromMinutes(1), <span style="color: #0000ff">false</span>, conn, <span style="color: #0000ff">null</span>);</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  24:</span>&#160; </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  25:</span>         <span style="color: #008000">// Create request message</span></pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  26:</span>         <span style="color: #0000ff">string</span> outgoingBody = <span style="color: #006080">&quot;my really cool msg that broker understands&quot;</span>;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  27:</span>         Message request = <span style="color: #0000ff">new</span> Message(<span style="color: #006080">&quot;DEFAULT&quot;</span>,</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  28:</span>                                       <span style="color: #0000ff">new</span> MemoryStream(Encoding.UTF8.GetBytes(outgoingBody)));</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  29:</span>&#160; </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  30:</span>         dialog.Send(request, conn, <span style="color: #0000ff">null</span>);</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  31:</span>         dialog.End(conn, <span style="color: #0000ff">null</span>);</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  32:</span>     }</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  33:</span>     <span style="color: #0000ff">catch</span> (ServiceException ex)</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  34:</span>     { <span style="color: #008000">//deal with the exception</span></pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  35:</span>     }</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  36:</span>     <span style="color: #0000ff">finally</span></pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  37:</span>     { <span style="color: #008000">//clean up</span></pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  38:</span>     }</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  39:</span> }</pre>
</p></div>
</div>
<p>&#160;</p>
<p>Again this code has a small issue what about if there is no Transaction available then sending a message without a transaction could be a bad thing. With one more change its ready to support both scenarios.</p>
<div style="border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, &#39;Courier New&#39;, courier, monospace; background-color: #f4f4f4">
<div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   1:</span> <span style="color: #0000ff">public</span> <span style="color: #0000ff">void</span> SendMsgToSSB()</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   2:</span>   {&#160;&#160; SqlTransaction tran = null;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   3:</span>       SqlConnection conn = <span style="color: #0000ff">null</span>;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   4:</span>       Conversation dialog = <span style="color: #0000ff">null</span>;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   5:</span>       Service client = <span style="color: #0000ff">null</span>;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   6:</span>       <span style="color: #0000ff">string</span> ConnectionString = <span style="color: #006080">&quot;Persist Security Info = False; Integrated Security = True; Initial Catalog = MyServiceBrokerDB; Data Source = .; Connect Timeout = 30;&quot;</span>;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   7:</span>       <span style="color: #0000ff">try</span></pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   8:</span>       {</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   9:</span>           conn = <span style="color: #0000ff">new</span> SqlConnection(ConnectionString);</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  10:</span>           <span style="color: #0000ff">if</span> (conn.State != ConnectionState.Open)</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  11:</span>           {</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  12:</span>               conn.Open();</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  13:</span>           }</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  14:</span>           <strong><em><font size="2"><span style="color: #0000ff">if</span> (Transaction.Current != <span style="color: #0000ff">null</span>)</font></em></strong></pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  15:</span>           <strong><em><font size="2">{</font></em></strong></pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  16:</span>               <font size="2"><strong><em>conn.EnlistTransaction(Transaction.Current);</em></strong></font></pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  17:</span>           <strong><font size="2"><em>}</em></font></strong></pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  18:</span>           <span style="color: #0000ff"><font size="2"><strong><em>else</em></strong></font></span></pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  19:</span>           <font size="2"><strong><em>{</em></strong></font></pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  20:</span>              <font size="2"><strong><em> tran = conn.BeginTransaction();</em></strong></font></pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  21:</span>           <font size="2"><strong><em>}</em></strong></font></pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  22:</span>&#160; </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  23:</span>           <span style="color: #008000">// Create a service object</span></pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  24:</span>           client = <span style="color: #0000ff">new</span> Service(<span style="color: #006080">&quot;MyCoolService&quot;</span>, conn, <span style="color: #0000ff">null</span>);</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  25:</span>           client.FetchSize = 1;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  26:</span>&#160; </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  27:</span>           <span style="color: #008000">// Begin a dialog with the MyCoolService</span></pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  28:</span>           dialog = client.BeginDialog(</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  29:</span>               <span style="color: #006080">&quot;MyCoolServiceTarget&quot;</span>, <span style="color: #0000ff">null</span>, <span style="color: #006080">&quot;DEFAULT&quot;</span>,</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  30:</span>               TimeSpan.FromMinutes(1), <span style="color: #0000ff">false</span>, conn, <span style="color: #0000ff">null</span>);</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  31:</span>&#160; </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  32:</span>           <span style="color: #008000">// Create request message</span></pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  33:</span>           <span style="color: #0000ff">string</span> outgoingBody = <span style="color: #006080">&quot;my really cool msg that broker understands&quot;</span>;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  34:</span>           Message request = <span style="color: #0000ff">new</span> Message(<span style="color: #006080">&quot;DEFAULT&quot;</span>,</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  35:</span>                                         <span style="color: #0000ff">new</span> MemoryStream(Encoding.UTF8.GetBytes(outgoingBody)));</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  36:</span>&#160; </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  37:</span>           dialog.Send(request, conn, <span style="color: #0000ff">null</span>);</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  38:</span>           dialog.End(conn, <span style="color: #0000ff">null</span>);</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  39:</span>           <font size="2"><strong><em><span style="color: #0000ff">if</span> (tran != <span style="color: #0000ff">null</span>)</em></strong></font></pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  40:</span>           <font size="2"><strong><em>{</em></strong></font></pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  41:</span>               <font size="2"><strong><em>tran.Commit();</em></strong></font></pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  42:</span>           <font size="2"><strong><em>}</em></strong></font></pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  43:</span>       }</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  44:</span>       <span style="color: #0000ff">catch</span> (ServiceException ex)</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  45:</span>       { <span style="color: #008000">//deal with the exception</span></pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  46:</span>       }</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  47:</span>       <span style="color: #0000ff">finally</span></pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  48:</span>       { <span style="color: #008000">//clean up </span></pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  49:</span>       }</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  50:</span>   }</pre>
</p></div>
</div>
<p>&#160;</p>
<p>I have also been making a few changes to the interface that I intend to publish shortly.</p>
</p>
<div class="wlWriterSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:5599eec9-5586-407a-ad4e-57af35c35375" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px">Technorati Tags: <a href="http://technorati.com/tags/sql+server" rel="tag">sql server</a>,<a href="http://technorati.com/tags/service+broker" rel="tag">service broker</a>,<a href="http://technorati.com/tags/c%23" rel="tag">c#</a>,<a href="http://technorati.com/tags/.net" rel="tag">.net</a>,<a href="http://technorati.com/tags/transactions" rel="tag">transactions</a>,<a href="http://technorati.com/tags/dtc" rel="tag">dtc</a></div>
<p><a href="http://www.addtoany.com/add_to/delicious?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2008%2F08%2F16%2Fservice-broker-c-wrapper-interface-and-transactions%2F&amp;linkname=Service%20Broker%20C%23%20Wrapper%20Interface%20and%20Transactions" title="Delicious" rel="nofollow" target="_blank"><img src="http://www.markharris.net.au/blog/wp-content/plugins/add-to-any/icons/delicious.png" width="16" height="16" alt="Delicious"/></a> <a href="http://www.addtoany.com/add_to/google_reader?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2008%2F08%2F16%2Fservice-broker-c-wrapper-interface-and-transactions%2F&amp;linkname=Service%20Broker%20C%23%20Wrapper%20Interface%20and%20Transactions" title="Google Reader" rel="nofollow" target="_blank"><img src="http://www.markharris.net.au/blog/wp-content/plugins/add-to-any/icons/reader.png" width="16" height="16" alt="Google Reader"/></a> <a href="http://www.addtoany.com/add_to/twitter?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2008%2F08%2F16%2Fservice-broker-c-wrapper-interface-and-transactions%2F&amp;linkname=Service%20Broker%20C%23%20Wrapper%20Interface%20and%20Transactions" title="Twitter" rel="nofollow" target="_blank"><img src="http://www.markharris.net.au/blog/wp-content/plugins/add-to-any/icons/twitter.png" width="16" height="16" alt="Twitter"/></a> <a href="http://www.addtoany.com/add_to/facebook?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2008%2F08%2F16%2Fservice-broker-c-wrapper-interface-and-transactions%2F&amp;linkname=Service%20Broker%20C%23%20Wrapper%20Interface%20and%20Transactions" title="Facebook" rel="nofollow" target="_blank"><img src="http://www.markharris.net.au/blog/wp-content/plugins/add-to-any/icons/facebook.png" width="16" height="16" alt="Facebook"/></a> <a href="http://www.addtoany.com/add_to/friendfeed?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2008%2F08%2F16%2Fservice-broker-c-wrapper-interface-and-transactions%2F&amp;linkname=Service%20Broker%20C%23%20Wrapper%20Interface%20and%20Transactions" title="FriendFeed" rel="nofollow" target="_blank"><img src="http://www.markharris.net.au/blog/wp-content/plugins/add-to-any/icons/friendfeed.png" width="16" height="16" alt="FriendFeed"/></a> <a href="http://www.addtoany.com/add_to/linkedin?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2008%2F08%2F16%2Fservice-broker-c-wrapper-interface-and-transactions%2F&amp;linkname=Service%20Broker%20C%23%20Wrapper%20Interface%20and%20Transactions" title="LinkedIn" rel="nofollow" target="_blank"><img src="http://www.markharris.net.au/blog/wp-content/plugins/add-to-any/icons/linkedin.png" width="16" height="16" alt="LinkedIn"/></a> <a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2008%2F08%2F16%2Fservice-broker-c-wrapper-interface-and-transactions%2F&amp;linkname=Service%20Broker%20C%23%20Wrapper%20Interface%20and%20Transactions">Share/Save</a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.markharris.net.au/blog/2008/08/16/service-broker-c-wrapper-interface-and-transactions/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
