>
>
>
> Without a spec, I can't think of a better thing to do for now for throwing
> unchecked exceptions over a <binding.jms> service
> than to always use an ObjectMessage, but I think we should do it in a way
> such that we don't require any SCA or Tuscany code on the client.


At the moment the chosen wireFormat has a bearing on the format of the
exception as it's thrown across the (JMS) wire. So in the default/textXML
case the exception is passed back over the wire as an XML document. With
Ant's latest changes it's arguably better than it was before. We pass back a
Text message with the exception XML in it. Intead of a Object message with
and Axiom object in it.

In the case of Object format you would expect the exception to be in an
Object message. If you get into more esoteric wire formats I guess you have
to document how exceptions will be passed so that you can pick them up in
the non-SCA case.

The alternative is to always throw exceptions in the same format.


>
>
> To do this, we're going to have to accept that we're going to accept that
> we'll lose the chain of exceptions we may have in the service-side container
> and simply throw a new java.lang.RuntimeException (and not
> ServiceRuntimeException), possibly reusing a chained exception's "message"
> (or maybe not even).
>
> So the non-SCA programming model for dealing with this becomes:
>  // listen for a response
>  if (responseMsg is ObjectMessage)
>     look for RuntimeException in message and deal with this somehow
>  else
>     handle normally the message of=f expected message type (depending on
> wireFormat)


We would need to look inside the return message to see what is in there as
it might or might not be an exception.


>
>
> And for an SCA reference we would have to do the same for every wireFormat
> on the reference side, (and "dealing with" the RuntimeExc
> would translate into throwing ServiceRuntimeException).
>
> Thoughts?
>
>
>

Reply via email to