BizTalk Server General - correct way to handle web services shutdowns ?

This is Interesting: Free IT Magazines  
Home > Archive > BizTalk Server General > December 2004 > correct way to handle web services shutdowns ?





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author correct way to handle web services shutdowns ?
john

2004-11-30, 5:49 pm

Suppose you have an orchestration that calls a web service. The web service
goes down. Your send port retries to call it and finally the messages are
suspended. I would like to automatically resume these messages when the web
service goes online (the same way as when you stop a send port ; when it is
restarted messages are automatically sent).
I have some problems using HAT to resume these messages, it doesn't work all
the time ; and when they are resumed the messagebox is not clean (there is a
"completed with discarded messages" message left).
So, what is the correct way to manage this ??


Matt Meleski

2004-12-01, 5:51 pm

John,

One simple way is to let your send port try the specified number of times
(For example: 3 retries with an interval of 5). If all retries fail , then
a Long Running Scope shapes ExceptionBlock (in the orchestration) will catch
the final Soap Exception, maybe an error like : Web Service Timeout.
A Send shape in the ExceptionBlock can then take the message, that never
made it
to the Web Service then resubmit it into BizTalk. Another Orchestration
would pick it up and then Start the Whole process again.
But of course if there are other operations in your Orchestration that
completed
successfully, then these would have to be backed out. If this is true, then
this
solution may not work for you. Additionally if you are just using a general
excection in your Exception Block in the Long Running Scope, and your message
made it to the Web Service and the Web Service threw and error (for example
divide by zero, because there is bad data in the message), then there is the
possiblity that you will
get in an endless loop for this message.

As far as automitically grabbing the suspended orchestration in HAT and
trying to
resubmit, look at using WMI.

Matt.


"john" wrote:

> Suppose you have an orchestration that calls a web service. The web service
> goes down. Your send port retries to call it and finally the messages are
> suspended. I would like to automatically resume these messages when the web
> service goes online (the same way as when you stop a send port ; when it is
> restarted messages are automatically sent).
> I have some problems using HAT to resume these messages, it doesn't work all
> the time ; and when they are resumed the messagebox is not clean (there is a
> "completed with discarded messages" message left).
> So, what is the correct way to manage this ??
>
>
>

Doug Girard [MSFT]

2004-12-07, 8:46 pm

John,

I would say the best way to manage retries is through the transport's Retry
Count and Retry Interval settings. This is actually a very powerful feature
of the product. You can tweak these settings to provide "many, quick
retries" to avoid sporadic lapses in the target server or "several, longer
interval retries" for server down scenarios. You can even get a combination
of both by using a Secondary Transport on the Send Port.

By design, if the Send Port cannot send the message after all of its
retries, it will throw an exception. If it is uncaught, it will cause the
instance to suspend as "Non-Resumeable". As Matt mentioned, a good practice
is to catch this exception. He suggests sending the message to another
orchestration at this point. That may work well for you.

Another option is to wrap up these steps in an atomic Scope shape and after
catching an exception from the Send Port, throw a
Microsoft.XLANG.BaseTypes.RetryTransactionException. This will cause the
entire Scope shape to be retried. If it continues to fail after a certain
number of retries, the instance will enter a suspended state. But this
state will be "Resumeable" so you will be able to manually restart it from
HAT or otherwise. When it restarts, the orchestration will resume from the
top of the Scope shape and retry your Send Port again.

HTH,
Doug Girard [MSFT]

This posting is provided "AS IS" with no warranties, and confers no rights.


"john" <jepros@yahoo.com> wrote in message
news:41acf6ef$0$24129$636a15ce@news.free.fr...
> Suppose you have an orchestration that calls a web service. The web

service
> goes down. Your send port retries to call it and finally the messages are
> suspended. I would like to automatically resume these messages when the

web
> service goes online (the same way as when you stop a send port ; when it

is
> restarted messages are automatically sent).
> I have some problems using HAT to resume these messages, it doesn't work

all
> the time ; and when they are resumed the messagebox is not clean (there is

a
> "completed with discarded messages" message left).
> So, what is the correct way to manage this ??
>
>



Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com