tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From antel...@apache.org
Subject svn commit: r986730 - in /tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms: operationselector/jmsdefault/runtime/ provider/ transport/
Date Wed, 18 Aug 2010 15:13:27 GMT
Author: antelder
Date: Wed Aug 18 15:13:26 2010
New Revision: 986730

URL: http://svn.apache.org/viewvc?rev=986730&view=rev
Log:
Update to better handle messages where the operation can not be determined

Modified:
    tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsdefault/runtime/OperationSelectorJMSDefaultServiceInterceptor.java
    tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/AbstractMessageProcessor.java
    tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/transport/TransportServiceInterceptor.java

Modified: tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsdefault/runtime/OperationSelectorJMSDefaultServiceInterceptor.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsdefault/runtime/OperationSelectorJMSDefaultServiceInterceptor.java?rev=986730&r1=986729&r2=986730&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsdefault/runtime/OperationSelectorJMSDefaultServiceInterceptor.java
(original)
+++ tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsdefault/runtime/OperationSelectorJMSDefaultServiceInterceptor.java
Wed Aug 18 15:13:26 2010
@@ -175,7 +175,7 @@ public class OperationSelectorJMSDefault
         }
         
         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;

Modified: tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/AbstractMessageProcessor.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/AbstractMessageProcessor.java?rev=986730&r1=986729&r2=986730&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/AbstractMessageProcessor.java
(original)
+++ tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/AbstractMessageProcessor.java
Wed Aug 18 15:13:26 2010
@@ -116,7 +116,7 @@ public abstract class AbstractMessagePro
             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);

Modified: tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/transport/TransportServiceInterceptor.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/transport/TransportServiceInterceptor.java?rev=986730&r1=986729&r2=986730&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/transport/TransportServiceInterceptor.java
(original)
+++ tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/transport/TransportServiceInterceptor.java
Wed Aug 18 15:13:26 2010
@@ -152,20 +152,22 @@ public class TransportServiceInterceptor
                 }
                 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);
+                    }
                 }
             }
     



Mime
View raw message