diff options
3 files changed, 18 insertions, 16 deletions
diff --git a/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsdefault/runtime/OperationSelectorJMSDefaultServiceInterceptor.java b/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsdefault/runtime/OperationSelectorJMSDefaultServiceInterceptor.java index e12850c41c..cefba467e0 100644 --- a/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsdefault/runtime/OperationSelectorJMSDefaultServiceInterceptor.java +++ b/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsdefault/runtime/OperationSelectorJMSDefaultServiceInterceptor.java @@ -175,7 +175,7 @@ public class OperationSelectorJMSDefaultServiceInterceptor implements Intercepto } if (operation == null) { - throw new JMSBindingException("Can't find operation " + (operationName != null ? operationName : ON_MESSAGE_METHOD_NAME)); + throw new JMSBindingException("Cannot determine service operation"); } return operation; diff --git a/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/AbstractMessageProcessor.java b/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/AbstractMessageProcessor.java index 8b665c91a8..35cc5769fb 100644 --- a/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/AbstractMessageProcessor.java +++ b/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/AbstractMessageProcessor.java @@ -116,7 +116,7 @@ public abstract class AbstractMessageProcessor implements JMSMessageProcessor { ObjectMessage message = session.createObjectMessage(); String causeMsg; if (o instanceof RuntimeException) { - message.setObject(new RuntimeException(o.getMessage())); + message.setObject(new ServiceRuntimeException(o.getMessage())); } else { // for a checked exception return the checked exception message.setObject(o); diff --git a/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/transport/TransportServiceInterceptor.java b/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/transport/TransportServiceInterceptor.java index 5ba01f5982..4ba33695e4 100644 --- a/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/transport/TransportServiceInterceptor.java +++ b/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/transport/TransportServiceInterceptor.java @@ -152,20 +152,22 @@ public class TransportServiceInterceptor implements Interceptor { } return msg; } - - String operationName = msg.getOperation().getName(); - if (jmsBinding.getOperationJMSPriority(operationName) != null) { - responseJMSMsg.setJMSPriority(jmsBinding.getOperationJMSPriority(operationName)); - } - - if (jmsBinding.getOperationJMSType(operationName) != null) { - responseJMSMsg.setJMSType(jmsBinding.getOperationJMSType(operationName)); - } - if (jmsBinding.getOperationJMSDeliveryMode(operationName) != null) { - if (jmsBinding.getOperationJMSDeliveryMode(operationName)) { - responseJMSMsg.setJMSDeliveryMode(DeliveryMode.PERSISTENT); - } else { - responseJMSMsg.setJMSDeliveryMode(DeliveryMode.NON_PERSISTENT); + + if (msg.getOperation() != null) { + String operationName = msg.getOperation().getName(); + if (jmsBinding.getOperationJMSPriority(operationName) != null) { + responseJMSMsg.setJMSPriority(jmsBinding.getOperationJMSPriority(operationName)); + } + + if (jmsBinding.getOperationJMSType(operationName) != null) { + responseJMSMsg.setJMSType(jmsBinding.getOperationJMSType(operationName)); + } + if (jmsBinding.getOperationJMSDeliveryMode(operationName) != null) { + if (jmsBinding.getOperationJMSDeliveryMode(operationName)) { + responseJMSMsg.setJMSDeliveryMode(DeliveryMode.PERSISTENT); + } else { + responseJMSMsg.setJMSDeliveryMode(DeliveryMode.NON_PERSISTENT); + } } } |