Jon Flanders' Blog

I guess I should be flattered

Friday, June 27, 2008 6:22:11 PM (GMT Daylight Time, UTC+01:00)

That some spammer thought my wiki pages where hit enough to warrant modifying them on a daily basis with links to various "odd" sites ;-)

Thanks to Craig I've upgraded to FlexWiki 2.0 and now those pages are locked down - I apologize if you've visited them and they haven't been right,  should be ok from now on.

My Workflow Sample Page

My BizTalk Sample Page

 

BizTalk | BizTalk 2006 | BizTalk 2006 R2 | WF   #    Comments [0]   

Blatant ad for upcoming courses

Wednesday, April 02, 2008 6:35:19 PM (GMT Daylight Time, UTC+01:00)

As a break from your normally scheduled technical content (or I guess abnormally scheduled considering my blogging habits lately), here are some classes I am teaching in the near future.

#1 - If you are in So Cal or you just feel like getting away from whatever cold, snowy local you are living in - I'll be teaching BizTalk Server 2006 R2 in Irvine, CA - https://www.pluralsight.com/registration/register.aspx?offeringid=267.

#2 - Again  in (sunny) Irvine - Aaron Skonnard and I will be doing a WCF/WF "Double-Feature" https://www.pluralsight.com/registration/register.aspx?offeringid=268  If you are interested in knowing all the new stuff in .NET 3.5 - we'll be covering that as well.

#3 - NY in August?  Well - can't really say come for the weather - but again I'll be doing our BizTalk Server 2006 R2 class on August 4th-8th in NY.  https://www.pluralsight.com/registration/register.aspx?offeringid=291  come for the training - stay for the food? (I guess I should give up my hope of being an adversiting guru).

Thanks for listening.  Technical content coming RSN.

.NET | BizTalk | BizTalk 2006 | BizTalk 2006 R2 | REST | WCF | WF   #    Comments [0]   

Video - using BizTalk Server 2006 R2 with REST Services (.NET 3.5)

Thursday, December 06, 2007 11:36:28 PM (GMT Standard Time, UTC+00:00)

BizTalk | BizTalk 2006 | BizTalk 2006 R2 | WCF   #    Comments [1]   

Two day Pluralsight "pre-conference" event

Friday, September 07, 2007 9:25:15 PM (GMT Daylight Time, UTC+01:00)

If you are coming to the SOA/BPI conference in October - consider coming two days early and hearing Aaron, Matt, and I do a deep technical presentation on all the cool new stuff coming out from the Connected Systems Division at MS.

Details are here - http://www.pluralsight.com/courses/WhatsNewInCSD.aspx

 

BizTalk | BizTalk 2006 | BizTalk 2006 R2 | RFID | WCF | WF   #    Comments [0]   

BizTalk is COM (or update to my post on Orchestration Performance)

Tuesday, July 17, 2007 1:18:14 AM (GMT Daylight Time, UTC+01:00)

So I was answering a question on a internal (to Microsoft) email list I am lucky to be on.  Someone asked a question about some code they were having trouble with  - the code in question was being called from an Orchestration in BizTalk and they were passing in the message as XmlDocument - converting that to an XmlValidatingReader as a way of validating the document against their schema.

I pointed them to my post on using XLANGMessage instead of XmlDocument for performance.  This actually seems to have solved their problem (even though I didn't think it would - I was just sort of morally opposed to creating an XmlDocument and then turning it into an XmlReader when they could just go directly to an XmlReader - why do two steps when one step would work?).

Tim Wieman (one of the BizTalk Rangers) pointed out to me that my code didn't explain something really important that my earlier post doesn't mention (perhaps I should edit that post as well now that I am writing this).  If you look at the docs for XLANGMessage it is pretty clear that when you are passing XLANGMessage to a .NET component - and you just plan on reading it during your method call - you *should* call Dispose on it before the end of your call.  This means you should always put the usage of XLANGMessage inside of a try block and call Dispose in a finally block (as the above documentation link clearly shows).  This was my bad - because of course I am generally thinking about .NET and not about COM.  Well - BizTalk isn't COM based - but XLANGMessage is reference counted. 

After a discussion with Tim and Paul Ringseth (one of the orignal developers of XLANGs) I came to accept this implementation.  Why did I reject it at first (I think on the email thread I called it "stupid" ;-)?  Well - it just felt unnatural to require *me* as the callee (the method implementor) be responsible for cleaning up the XLANGMessage object passed in by the caller.

In most APIs - if you were passed an object and then called Dispose on it - you'd be breaking the rules of your interaction with that API (one person I ran this by said "I'd be really pissed if you Disposed of *my* object" - that would be Mark Taparauskas - another really smart guy who doesn't blog ;-)).

As Paul explained - the message doesn't really belong to the .NET runtime - it belongs to the MessageBox database - so it is similar to a COM interop scenario.  The interesting thing is that the system is ref counted by the Orchestration instance in this case - so if you fail to call dispose - the reference gets cleaned up at the end of the Orchestration.  So depending on how long your Orchestration runs for (if it is short) it isn't a big deal.

But still -  the general rule of thumb is - if you are only using an XLANGMessage instance during a method call - make sure to call Dispose on it during that method call.

Brings me back to the days when we used to have heated discusions about Refernce Couting versus GC.  I guess those days are not completely gone yet - even in a .NET product like BizTalk.

 

BizTalk | BizTalk 2006 | BizTalk 2006 R2   #    Comments [1]