On Thu, Aug 27, 2009 at 11:01 AM, Simon Laws<simonsl...@googlemail.com> wrote:
> Way back in the mists of time what the default binding used to do was
> trap any "target not found" type exceptions and re-resolve the
> endpoint in that case. Worked OK, easy to do and doesn't lead to a
> resolution on each call.
>
> If you catch the exception, set the EndpointReference status back to
> EndpointReference.WIRED_TARGET_NOT_FOUND and then call
> EndpointReferenceBuilderImpl.runtimeBuild(). If the result of that is
> an endpoint reference in
> EndpointReference.WIRED_TARGET_FOUND_AND_MATCHED status then retry the
> call. If not then throw a runtime exception. That should do the trick.
>
> Simon
>

I should have been a bit clearer about where this needs to happen.
Firstly down in the binding invoker you'll need to catch the protocol
specific exception and then throw something (an endpoint reference no
longer valid exception) back up to be caught in the
RuntimeWire.invoke(). From there you can reset the invocation chains
using initInvocationChains(). This in turn will call the
EndpointReferenceBuilderImpl.runtimeBuild() for you.

Simon

Reply via email to