December 2007 - Posts

Getting ClustrMaps into CommunityServer
29 December 07 09:48 PM | Johan Hedberg

I know, when you're just starting out a blog, you don't have that many readers, if any - so having an empty ClustrMap isn't all that cool. But we all started somewhere. Getting ClustrMap for your blog is as simple as it gets. Just go to and sign up for a free account, wait for a mail and sign in using the password it will contain, then paste some html. Follow the same procedure as my previous post.

Getting Messenger into Community Server 2007.1
29 December 07 12:48 AM | Johan Hedberg | 1 comment(s)

See the little Messenger status icon under the News section in the sidebar? You can use that to contact me. If you click it it will open up a web messenger style dialog in a new browser window allowing you to either sign in with your Live Id or post a message anonymously (I'm allowing that for now).

If you want this on your site you can find out how at the Messenger blog. Basically you go to your online Messenger Settings and choose one of three styles, the little messenger window where you can chat directly in the same window as the blog, the staus icon look and the button look, which is a status icon and your display name inside a button. You then get html code to paste to whereever you want it.

I wanted the later, which of course was the one I couldn't get working. The first obstacle, being new to CommunityServer, was finding out what to do to get something in the sidebar. I found this blog post, saying that you could basically put anything in the News section. Sounded easy enough. The example is from an older version of CommunityServer, things look a little different in the version I'm using, but the idea still works. When I pasted the html and clicked save though, it got formatted into html special characters text making the actual code appear on my blog instead of the meaning it represented. Finding out why that happens was a matter of another search, locating this forum post, explaining how to alter the configuration to allow for the script tags to pass unchanged. I did that. I also added in the attributes of msgr:width etc to the div tag. Since the configuration file is xml I also added a namespace declaration for the msgr namespace. I finally got the code as it should be, but the button still won't show up. I suspect it has something to do with the class of the div that contains it, or perhaps it being inside a ul tag. Not sure. For now I settled on the status icon instead. If anyone has insight into how to get this to work, feel free to share.

.NET 3.5 Certifications in BETA
27 December 07 10:04 PM | Johan Hedberg

I got inivited to do the beta exam 71-504: TS: Microsoft .NET Framework 3.5 - Windows Workflow Foundation. Once in a while I get these kinds of invites, those of you who are certified and have reached a certain level and/or participated in beta exams before know what they are. Given my experience from beta exams from the past they are usually much longer then your regular exam, often containing up towards 90 or so questions making you busy for a bit longer then the run on the mill exam. With betas running now the exam itself will probably go live sometime this spring or early summer, although the exam site says March. As my primary interest at this point in time is BizTalk, I have a fair understanding of workflow, but it's been two years since I was involved in actually doing real-world projects in WF and back then it was in beta. I'll probably not do this exam, especially since the beta period runs through January 4th, and I'm on vacation. I'd much rather do the beta exam for Windows Communication Foundation, but so far I haven't seen any invite for that. Full list of current and comming certifications is here. So far there seems to be no practice tests available for these new exams for those of you who like that learning path, but I'm sure they'll popup soon after the tests become available.

Filed under: , ,
Visualizing the benefit of forwardonly streaming in custom pipeline components
20 December 07 09:56 PM | Johan Hedberg | 7 comment(s)

When doing custom pipeline component development you need to be aware of the forward-only streaming best practice. In short this means developing your pipeline components so that they do their logic either as a custom stream implementation or by reacting to the events availble to you through the Microsoft.BizTalk.Streaming.dll stream classes. Without ever keeping anything except the small stream buffer in Memory and without ever seeking the original stream. This is best practice from the perspective of resource utilization, both memory and processor cycles.

Microsoft.BizTalk.Streaming isn't available to reference out of the box in BizTalk Server 2006, you have to get it out of the GAC to be able to use it.

Now there are a couple of good writings about streaming pipeline components and some of the peculiarities you have to think about when developing them. I won't repeat more of it here. Instead the focus of this post is to make you aware of the difference between acting upon the stream as it is being read as opposed to reading through the stream in the execute method of the pipeline component (which is generally a bad idea, but necessary in some cases) by presenting a visual image of it for you.

 The scenario is the following: We have three custom pipeline components in a pipeline. The images below will show the difference between reading the stream the best practice way of reacting to what you need as the stream is being read once as opposed to reading the entire stream through in each pipeline component. I'm sure everyone is familiar with DebugView, and I will use it to display the trace statements outputed by the pipeline component.

Now basically what is being done here is that in the first pipeline component a stream wrapper is created, just so that we will get events from when the original stream is being read, in all three components we then use the events of the forward only eventing stream to react to events as the stream is being read. In the image above we can see that the original stream read event is called 3 times.

 This instead is what would happen if we read through the stream in every pipeline component, instead of once. As we can see the stream is read 10 times. Now 3 times or 10 might not sound that much - the stream is however intentionally small. The point is that it is read 3 times, instead of the one. You should also keep in mind that many streams are not naturally seekable, requiring temporary storage or the likes to make them so which only adds to the resource waste.

Clean up the MsgBox
13 December 07 09:00 PM | Johan Hedberg | 1 comment(s)

Do you sometimes end up with instances in the admin console that just wont go away? That are pending to be suspended, but doesn't seem to ever get there. I did just the other day. To solve this I used the SQL way of terminating these messages, which always seems to do the trick. But it's not without risk. Thats one of the many reason why there is emphasis on not running this against production. As the technet how-to describes this procedure is empty by default, so remember to add the logic by running the msgbox_cleanup_logic.sql script. There is also an issue with this procedure and tracking but there is a kb hotfix available that solves that. Presumably it's correct from the start in R2 but I haven't compared the two.

In short the SQL way of doing it involves running the procedure bts_CleanupMsgbox (once it contains logic). This procedure has an optional parameter named @fLeaveActSubs which by default is 1. Running it with the optional parameter set to something other then 1 will cause all subscriptions to be removed. Not something you'd typically want. A special note here is that since SQL checks for <> 0, passing in null will cause it to behave as if you sent in 0, since null compared to anything in SQL is always false. This is an issue because if you do Script As Execute in SQL the code that gets generated will default to you passing in null:

DECLARE @fLeaveActSubs int
-- TODO: Set parameter values here.
EXECUTE @RC = [BizTalkMsgBoxDb].[dbo].[bts_CleanupMsgbox] @fLeaveActSubs

Your ports and orchestrations will still look like their running, and in a way they are, but there are no subscriptions, so you're likely to get a routing failure. For you to get your subscriptions back you need to unenlist the send ports and then restart them. For orchestrations this isn't enough, here you have to go the additional length of un-binding them and then re-configure and start them.

The BizTalk Core Engine's WebLog mentions in this post that it might also be a good idea to run bts_PurgeSubscriptions directly after, but if your SQL Agent and the PurgeSubscriptionsJob is enabled (and it should be) then this will be done as part of that job.

Filed under: , ,
What you can expect from this blog
12 December 07 10:14 PM | Johan Hedberg

I think starting a blog merrits an introduction. This isn't the first time I've jumped on the blogging train. The first time was actually back in 2004, though that time I decided to do it in a more closed circle. My blog back then was (still is) hosted on msn spaces and available to my msn contacts only. I've since moved on and don't use that msn account any more and the content of that blog is outdated.

I title myself a solutions architect, or perhaps an integration architect, working within the sphere of products and technologies coming out of Microsoft and the Connected Systems Division. I appreciate certifications as a learning path and have aquired a few over the years. In Microsoft certification terms I'm an MCP, MCAD, MCSD, MCTS and MCPD.

Expect to see me deliver posts with technical content in the CSD area, mostly around BizTalk. At the moment my main focus apart from that of my customer is ESB Guidance and BizTalk services. I will however also post interesting tidbits from my daily work and articles about things I have found or have been asked about.

Filed under:

This Blog



    Twitter Updates

      Follow me on twitter


      Feedburner Subscribers

      Locations of visitors to this page


      All material is provided AS IS voiding any thinkable or unthinkable effect it might have for any use whatsoever. There... is that clear enough ;)