diff options
author | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2009-02-17 16:48:32 +0000 |
---|---|---|
committer | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2009-02-17 16:48:32 +0000 |
commit | e5363963809401e48a2a70ff77f5a5aa087b0b1d (patch) | |
tree | a953c2f3b3ca992b6d43dd24dc81cb0975df8599 /branches/sca-java-1.x/modules/binding-jms-runtime | |
parent | 5d822e23be57e5a38572d96a621211b4a0ea81dc (diff) |
TUSCANY-2845: Change JMS binding so unchecked exceptions are returned as RuntimeExceptions
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@745140 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'branches/sca-java-1.x/modules/binding-jms-runtime')
-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); |