tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From antel...@apache.org
Subject svn commit: r682615 - in /tuscany/java/sca/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider: JMSBindingListener.java JMSBindingServiceBindingProvider.java
Date Tue, 05 Aug 2008 07:44:32 GMT
Author: antelder
Date: Tue Aug  5 00:44:31 2008
New Revision: 682615

URL: http://svn.apache.org/viewvc?rev=682615&view=rev
Log:
Updates for special 'onMessage' method

Modified:
    tuscany/java/sca/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSBindingListener.java
    tuscany/java/sca/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSBindingServiceBindingProvider.java

Modified: tuscany/java/sca/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSBindingListener.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSBindingListener.java?rev=682615&r1=682614&r2=682615&view=diff
==============================================================================
--- tuscany/java/sca/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSBindingListener.java
(original)
+++ tuscany/java/sca/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSBindingListener.java
Tue Aug  5 00:44:31 2008
@@ -94,13 +94,16 @@
     protected Object invokeService(Message requestJMSMsg) throws JMSException, InvocationTargetException
{
 
         String operationName = requestMessageProcessor.getOperationName(requestJMSMsg);
-        Object requestPayload = requestMessageProcessor.extractPayloadFromJMSMessage(requestJMSMsg);
-
         Operation operation = getTargetOperation(operationName);
 
         MessageImpl tuscanyMsg = new MessageImpl();
-        tuscanyMsg.setBody(requestPayload);
         tuscanyMsg.setOperation(operation);
+        if ("onMessage".equals(operation.getName())) {
+            tuscanyMsg.setBody(requestJMSMsg);
+        } else {
+            Object requestPayload = requestMessageProcessor.extractPayloadFromJMSMessage(requestJMSMsg);
+            tuscanyMsg.setBody(requestPayload);
+        }
 
         setHeaderProperties(requestJMSMsg, tuscanyMsg, operation);
 

Modified: tuscany/java/sca/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSBindingServiceBindingProvider.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSBindingServiceBindingProvider.java?rev=682615&r1=682614&r2=682615&view=diff
==============================================================================
--- tuscany/java/sca/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSBindingServiceBindingProvider.java
(original)
+++ tuscany/java/sca/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSBindingServiceBindingProvider.java
Tue Aug  5 00:44:31 2008
@@ -82,8 +82,11 @@
         if (service.getInterfaceContract() != null) {
             try {
                 InterfaceContract ic = (InterfaceContract)service.getInterfaceContract().clone();
-
-                Interface ii = (Interface)ic.getInterface().clone();
+                Interface ii = ic.getInterface();
+                if (ii.getOperations().size() == 1 && "onMessage".equals(ii.getOperations().get(0).getName()))
{
+                    return;
+                }
+                ii = (Interface)ii.clone();
                 ii.resetDataBinding("org.apache.axiom.om.OMElement");
                 ic.setInterface(ii);
                 service.setInterfaceContract(ic);



Mime
View raw message