Monthly Archives: May 2005

When can you just re-gac and re-start

On of the fundemental part of working with BizTalk is understanding how BizTalk uses the assemblies you build in VS.NET.  The process of development is to create a VS.NET BizTalk project and then add BizTalk artifacts (schemas, maps, orhestration, and pipelines) and then Deploy them into the BizTalk managment database so that the BizTalk runtime can know about the artifcats you want to use, and be able to load them at runtime.  In order to load them at runtime, these assemblies all have to be deployed into the Global Assembly Cache (GAC).

When you deploy a BizTalk assembly, the deployment tool uses Reflection to determine what artifacts are in the assembly and then adds the appropriate entries into the management database tables.   One of the more frustrating things working with BizTalk can be knowing when you have to undeploy an already deployed assembly.  Undeploying and redeploying can be a difficult experience.  I won’t even both to enumerate all the things that can happen when you do that, but I think anyone who has worked much with BizTalk has had a “undeploy experience” :).

One thing you can do to avoid having to go through the undeploy/deploy/rebind/reconfigure is do what I call the three-Rs of BizTalk development – Re-build, Re-gac, and Re-start.  Whenever you make a change to an artifact in your BizTalk assembly, you always have to Re-build.  If you want BizTalk to pick up this change the next time you run the artifact (let’s say you want an orhestration change to execute the next time you send a message into your BizTalk application) – you MUST Re-start the BizTalk host process.  If you don’t – even if you undeploy and deploy your assembly, the BizTalk host will still have cached in memory the assembly it loaded the last time it Re-started.  This caching is what is supposed to happen in the CLR for efficiency reasons.

One thing to learn then is when do you have to undeploy and deploy and artifact again, and when can you just Re-start the host.  Remember you always have to Re-build and you always have to Re-gac.  Figuring out the changes that can just leave you with Re-build,Re-gac, and Re-start steps versus having to undeploy and deploy again will save you an enormous amount of development time.

I’ve created this table to help people figure out – what changes require me to Undeploy and Deploye (the UD column on the table) and which changes allow you to just Re-gac and Re-start (the GR on the table).  So the key for this table is U==Undeploy, D==Deploy,Gac==put the assembly in the GAC, and R==Restart the BizTalk host.

Remember – you always have to do the GR step.  The question you can ask yourself when you make a change is – can I avoid having to UD (Undeploy and deploy).  If anyone has any addition comments let me know please – or if you see something that isn’t correct – please leave a comment on this post.




This would be – “Yet another BTSnapshot update”.  :)  I apologize to those of you who have downloaded it over the last few days – it had a nasty bug in it.  Bug fixed.  Please download here.  All bug reports are absolutely welcome.  I probably should add the auto-email of the bug report like Reflector does.

TechEd Demo

Michael and I are doing a talk together at Tech-Ed US – CSI314 Implementation of Common Integration Patterns with BizTalk Server – you can find it by going to the Tech-Ed website and searching for it on the session tool.

We’ll be talking about common patterns with BizTalk and we picked two to show in our demo – because it is a really complicated demo – we’ve put it up here for people to look at before the talk (so if you plan on coming to our talk – which you should ;-)) you should take a look at it before hand if you can.

Download the Install package

The documentation I’ve put up on a wiki page – so it can be updated easily – if you are interested in learning about the details of the demo – go to the documentation page

Even if you aren’t coming to Tech-Ed I think this is an interested demo of a couple things – first of all the Patterns being used (Async Aggregation and Interrupt) – but also of InfoPath and WSE with BizTalk.

Feel free to check it out – I’d love any comments people might have.

More BizTalk blogging == good

Michael Woods – a Sr Technical Product Manager on the BizTalk Server Team has started a blog – and its on my website!  It is quite an honor with which I introduce Michael’s blog. RSN I’ll be putting up the demo/sample we are doing at our TechEd session on Orchestration Patterns. I think it is a really cool demo (if I do say so myself ;-)).