diff options
Diffstat (limited to 'branches/sca-java-1.x/modules')
-rw-r--r-- | branches/sca-java-1.x/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/AbstractMessageProcessor.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/branches/sca-java-1.x/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/AbstractMessageProcessor.java b/branches/sca-java-1.x/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/AbstractMessageProcessor.java index c69bac7641..d65522e541 100644 --- a/branches/sca-java-1.x/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/AbstractMessageProcessor.java +++ b/branches/sca-java-1.x/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/AbstractMessageProcessor.java @@ -109,9 +109,11 @@ public abstract class AbstractMessageProcessor implements JMSMessageProcessor { try { ObjectMessage message = session.createObjectMessage(); - if (o instanceof ServiceRuntimeException && ((ServiceRuntimeException)o).getCause() instanceof InvocationTargetException) { - message.setObject(o.getCause() ); + String causeMsg; + if (o instanceof RuntimeException) { + message.setObject(new RuntimeException(o.getMessage())); } else { + // for a checked exception return the checked exception message.setObject(o); } message.setBooleanProperty(JMSBindingConstants.FAULT_PROPERTY, true); |