users@jax-rpc.java.net

Re: one-way invocations

From: Bobby Bissett <Robert.Bissett_at_Sun.COM>
Date: Tue, 08 Mar 2005 16:25:49 -0500

Rinesh Agnihotri wrote:
> Hi, This is a question related to MessageHandlers. According to
> JAXRPC - When a message Handler returns false the further execution
> should be stopped and exception should be thrown back to client.

I think you have confused two different parts of the same section. If a
handler returns false, the runtime stops the handler processing (or
switches to response processing). There is no exception in this case.
It's when a client handler throws an exception that the exception is
propagated up to the client.

>
> How do I communicate, lets say a
> dynamic value between client code and client side Handler?

This will be easy to do in jaxrpc 2.0 where there are context objects
that the stub can use for this purpose. In the meantime, one way I've
done it for testing handlers is to create a singleton class that stores
data for handlers. It's a simple hack, but allows both the client and
handler objects to get the same data object. There's no Stub api in 1.X
for doing this directly.

Cheers,
Bobby