October 2009 - Posts

LiveMeeting presentation tools
27 October 09 07:25 AM | Johan Hedberg

I just finished delivering the last of the modules of 6461A: Visual Studio 2008: Windows Communication Foundation, through a mix of on-premises and distance delivery, for a group of roughly 30 people. All that’s left is a little wrap up. Previously on Windows Vista I’ve had my A2DP bluetooth headset working, but I just simply couldn’t get that to work on Windows 7. So I got a new toy, the LifeChat ZX-600.


I can recommend it for delivering LiveMeetings or Webcasts. The sound quality is good, the device is unobtrusive allowing movement (which is a problem with a non-portable microphone) and it works nicely for Windows 7 although the product info page doesn’t explicitly say so.

I use it together with my Presenter Mouse 8000 (which also works perfectly both on Windows 7 without its co-delivered USB transmitter) as the hardware part of the tools I use when delivering courses as an MCT or otherwise.

Strange BizTalk WMI behavior (curious BizTalk SQL)
25 October 09 03:22 PM | Johan Hedberg | 1 comment(s)

This week a co-worker raised an issue with a WMI query where he did a simple query for an orchestrations messages, and for some reason not all of them were returned. This behavior exists on both 2006 R2 and 2009, and thus most likely on 2006 as well. The query was simple:

select    *
from    MSBTS_MessageInstance
where    ServiceInstanceID = '{9DD50CE0-CC9C-478C-B19D-A3AAFD33ACA3}'

This was supposed to return two messages, but only one was returned, illustrated below in WMIExplorer:


He came up with a solution where he could instead do a LIKE query and get both message instances returned:

select    *
from    MSBTS_MessageInstance
where    ServiceInstanceID LIKE '{9DD50CE0-CC9C-478C-B19D-A3AAFD33ACA3}'


Now I was ok with this as a solution, but I wanted to find out a bit about why this happened.

Using SQL Profiler to see what this WMI query meant I found a call that looked like this when I used ‘=’:

exec BOM_LookupMessageReferences
  @dtFrom='Oct 25 3009 12:06:31:360PM',@dtUntil='Oct 25 1809 12:06:31:360PM',

and like this when using ‘LIKE’:

exec MBOM_LookupMessageReferences
  @dtFrom='Oct 25 3009 12:06:42:867PM',@dtUntil='Oct 25 1809 12:06:42:867PM',

Spot the difference?

Sure enough in one case we send in the (service)instanceId and in the latter, we don’t. This in effect, causes the latter query to return all messages matching the other criteria, and filtering on the serviceInstanceId is made elsewhere, presumably in the code executed by the WMI call, although I haven’t investigated that further.

So what makes the first query return only one message? It’s got the service instance Id with it, and nothing else, so what’s causing it to filter out the single message.

Looking further into the call chain in SQL, the method MBOM_LookupMessageReferences uses methods named MBOM_LookupMessageReferences_<host>, for example MBOM_LookupMessageReferences_BizTalkServerApplication.

In this (these) procedures you can find the following code:

if (@uidInstanceId IS NOT NULL)
    set ROWCOUNT 1
else if (@nMaxMatches > 0)
    set ROWCOUNT @nMaxMatches

So if we send in a serviceInstanceId we will just get a single message instance returned. I’m not sure what the point of this is really, but it seems to be interfering with what we want.

It’s an universal truth that you do best to stay out of the BizTalk databases and their queries. I’m not going to suggest something that I will call a solution in this post, especially not since I haven’t done sufficient testing to see that this doesn’t interfere with something else.

However, from the test I have done, it seems as if the following code change might be what was intended:

if (@uidMessageId IS NOT NULL)
    set ROWCOUNT 1
else if (@nMaxMatches > 0)
    set ROWCOUNT @nMaxMatches

Which gives the result I want for a serviceInstanceId query:


as well as for a messageInstanceID query;


We are not likely to use this alteration, since I’m ok with the way that the LIKE query works, even though it takes a wider scope then necessary. But perhaps this might help or enlighten someone that finds themselves with a similar puzzle.

.csharpcode, .csharpcode pre { font-size: small; color: black; font-family: consolas, "Courier New", courier, monospace; background-color: #ffffff; /*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt { background-color: #f4f4f4; width: 100%; margin: 0em; } .csharpcode .lnum { color: #606060; }
Filed under: , ,
BizTalk Server 2009 VPC
18 October 09 08:00 PM | Johan Hedberg | 7 comment(s)

Available. Usable for demos, Hands-On labs and just getting a peak at BizTalk Server 2009 if you aren’t yet running it. Good news. Get it here.

Update 1 [2009-10-19]: This download is currently corrupt. Fix pending.
Update 2 [2009-10-24]: The download page has been removed. Links to files still work. Files still corrupt AFAIK.
Update 3 [2009-10-25]: Download is live again! Files are still corrupt.
Update 4 [2009-10-30]: I've download it 5 times. Still corrupt. Some people in other parts of the world seem to be able to download it ok, while others in the same country gets it corrupt. Cached somewhere?
Update 5 (2009-11-02): Got a question from a blog reader that downloaded the file today and found it corrupt if I had heard when a fix was comming. I haven't.
Update 6 (2009-11-04): I've had multiple reports of people downloading the file, both those finding it corrupt and those who are able to use it ok. Try it if you have the bandwidth to spare. I haven't been able to pinpoint any determining factor, though I do so hate things that are down to chance.

Update: Here are the links directly to the files, for loading in FDM or similiar.

Part 1
Part 2
Part 3
Part 4
Part 5
Part 6
Part 7
Part 8

Contruct ChannelFactory takes too long with config
15 October 09 09:14 PM | Johan Hedberg | 5 comment(s)

Recently we experienced an issue with a service where the first call took a long time to complete. Subsequent calls would complete fine and fast, but the first call took a long time. Using Service Trace Viewer told us that the problem lay at constructing ChannelFactory.


The detailed trace of this activity didn’t give us any more hints to what was causing the problem.


All we could see was that the time appeared to all disappear when WCF tries to get the configuration for service.

The code for this (I’m just using the automatically generated Service1 template to illustrate) was as follows:

proxy = new Service1Client();

This is strange indeeded. Since loading the config seemed to be the issue, we changed the code to do this programmatically instead.

EndpointAddress address = new EndpointAddress("net.tcp://localhost/SimpleService/Service1");
proxy = ChannelFactory<IService1>.CreateChannel(new NetTcpBinding(), address);

Running this and looking at the trace for this revealed that this was a much more performant way of doing this.


For the scenario we had this solution was fine – but it’s not really a solution, it’s a workaround.

I’m still at a loss to describe why this happened on these servers, since the same thing worked quite differently on other servers. There, both solutions performed the same. So this is obviously something connected to some setting or circumstance that differs on those servers when compared to others.

If anyone has insight into this, or suggestions, please share.

Filed under: ,
Book Review: Pro BAM in BizTalk 2009
11 October 09 11:00 PM | Johan Hedberg

A while back now I got the Pro BAM in BizTalk Server 2009 book. I have always liked BAM and we always try to use it in our solutions, if nothing else then for infrastructural logging purposes. However BAM has never been something that has been described in any detail or highlighted within the BizTalk documentation. There are also a great deal many BizTalk solutions and developers out there that have never used BAM, perhaps in part because they haven’t had a good source to learn about it. When we had a user group meeting and talked about BAM last year we did a short put-your-hand-up poll and, if my memory serves, only about one out of five did put their hand up. And this in a group that to a large part I would judge as pretty progressive. I didn’t ask how many had used BAM outside of BizTalk, but I am pretty sure that if I had the answer might have been one or two, out of the whole group, if that.

If the issue is that it’s hard to find a source that covers BAM, one that is decently complete in its coverage, then that is one issue that is now resolved. Pro BAM in BizTalk Server 2009 succeeds in being that source. It covers both development, administration and business aspects of BAM. And with Business I don’t solely mean the Business Analyst role, but also where BAM fits, where it makes sense, and how you can get your data into the observation model as well as how you can get it out and report and research on it.

Although BAM presently is a BizTalk bundled technology the book approaches BAM from a BizTalk independent way, and talks as much about BAM in relation to other connected system technologies like WCF and WF as it does BizTalk. But that’s in line with the trends of BizTalk in general, where WCF more and more is taking on a very central role. Not everything is 100% up to date, but that’s not to be expected – change happens so fast that yesterday can be old news today, but the book still strives to put things in context of the latest technology and concepts and touches on topics such as Dublin and Oslo.

The book also goes into great detail about how to use the different types of tooling that comes along with BAM aimed for the different roles of Business Analyst, Developer, Administrator, and Information Worker (or Data Consumer as the book calls it). I also like how the book has specific sections on troubleshooting, should everything not work as expected, and tips that goes beyond just configuring it but also living with it.

It’s a really complete book in its coverage of BAM, and pointing out what’s missing is not an easy task, and isn’t really fair to the authors. If anything a discussion on BAM and performance could have been present. Although BAM has a highly performing infrastructure, a performance discussion is always of interest, especially from a BizTalk perspective when comparing it to for example the DTA tracking. The book also doesn’t go into much detail about when different tables are used, or what they contain and what flags have what meaning. Such things are however not need to know for you too call yourself a BAM wiz, something which this book may very well help you become.

Thanks Jeff and Geoff, it’s a great addition to my library. And I’m a better BizTalker for reading it ;)

Filed under: ,
BAM and SSIS notes worth repeating
11 October 09 01:45 AM | Johan Hedberg

SQL Server Integration Services (SSIS) is not a clustered resource. Connecting to SSIS generally means connecting to any of the SQL Server servers in your cluster environment directly, not to a virtual cluster address. Configuring SSIS for a named BAM instance still involves configuring it against your clustered BAM database instance. The BizTalk install documentation (Multicomputer) also claims that SSIS needs to be installed on the BizTalk Servers. That’s incorrect. You could install SSIS and that’d be good, but I much rather install the management tools, as explained and outlined here.

While talking about BAM I can’t help but to mention an excellent article recently written by Saravana Kumar here.

Doesn’t everyone want to be the one that chooses?
11 October 09 01:23 AM | Johan Hedberg | 6 comment(s)

Lazy? Perhaps. But bad? Unfair!

IT departments and consulting companies alike are not populated by bad developers, or lazy developers, or impassionate for that matter. The word passionate is appropriate for developers or architects that do keep in sync with all the new choices available to us. Pragmatic may very well be a good definition for the rest. But calling them bad developers wont motivate anyone, and, in my opinion, is unfair. Keeping that up to date is not a task necessary for all developers. But all developers could benefit and grow from doing so.

The developer isn't the problem

However, as I see it, the problem isn't with the developers, the problem is with management. Developers want to learn. I think that applies to most if not all developers. The problem however is two fold. One, Developers are not given the time need to learn by management to be able to make educated choices. You really have to be passionate to take that learning outside of your working hours, and push that passion onto your family and friends, to the point where it's not just your job - it's become a much bigger part of your life. That's why I think the word passionate fits.

What choice is there?

So if you aren't given time to learn as part of your job, you really have very little choice. The choice left is instead to do it in your free time or not. Two, even though Microsoft may sometimes claim that new choices are driven by business demand, and I'm sure it often is, it's often not driven by the business that you as a developer are supporting. What I mean is - the people manning your business will not always (and do not often) see how the new technologies benefits the business. The use for the business is often visualized to them by the developers, and this is where the real issue and catch 22 lies... 

It will never be the same again

This increased flow of choices is in itself the root of the problem. Developers used to know it all. Management has gotten used to that. Today, the technologies to learn are so many more and diverse. We will never know it all again. But we can become fairly good and know enough to be good at our job. But we need to be given the time and possibility. Given that, I think everyone would choose to learn.

Focus on management

So, my call to action is to instead shift the focus from the developers, whom I'm believe in general want to learn, to management and the business, and make them understand how enabling people to learn new technology will help them realize their business goals. Because I do firmly believe they will benefit.

This post was my thoughts on the topic initiated by the duoblog done by Johan Lindfors and Patrik Löwendahl. Oh, and incidentally, we’ve been here before. I wrote about this topic, or one very close too it, as a result of things said or written by close to the same people a year ago, see here and here, if interested.

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 ;)