[ 
https://issues.apache.org/jira/browse/TUSCANY-2845?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12673288#action_12673288
 ] 

Scott Kurz commented on TUSCANY-2845:
-------------------------------------

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.

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)

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?
   



> Checked exceptions w/ default JMS wireFormat over <binding.jms> should 
> serialize fault, not FaultException
> ----------------------------------------------------------------------------------------------------------
>
>                 Key: TUSCANY-2845
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-2845
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA JMS Binding Extension
>            Reporter: Scott Kurz
>
> I realize the spec doesn't spell this out, but I think the most natural 
> mapping to say, what we do in <binding.ws>
> would be to serialize the fault to XML and put it in a TextMessage, assuming 
> that the other side can construct the appropriate
> exception from the fault.
> True this is very JAX-WS-ish, which a straight JMS programmer might not 
> expect... but what else could we do, use java.lang.Exception somehow?
> Today the checked exc seems to result in the throwing of FaultException, 
> which will only work if Tuscany is on both sides.  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to