tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From antel...@apache.org
Subject svn commit: r609149 - in /incubator/tuscany/java/sca/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms: impl/JMSBinding.java provider/JMSBindingInvoker.java provider/JMSBindingReferenceBindingProvider.java
Date Sat, 05 Jan 2008 15:11:12 GMT
Author: antelder
Date: Sat Jan  5 07:09:57 2008
New Revision: 609149

URL: http://svn.apache.org/viewvc?rev=609149&view=rev
Log:
Support one-way style invocations

Modified:
    incubator/tuscany/java/sca/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/impl/JMSBinding.java
    incubator/tuscany/java/sca/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSBindingInvoker.java
    incubator/tuscany/java/sca/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSBindingReferenceBindingProvider.java

Modified: incubator/tuscany/java/sca/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/impl/JMSBinding.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/impl/JMSBinding.java?rev=609149&r1=609148&r2=609149&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/impl/JMSBinding.java
(original)
+++ incubator/tuscany/java/sca/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/impl/JMSBinding.java
Sat Jan  5 07:09:57 2008
@@ -26,7 +26,6 @@
 
 import org.apache.tuscany.sca.assembly.Binding;
 import org.apache.tuscany.sca.binding.jms.provider.JMSMessageProcessor;
-import org.apache.tuscany.sca.host.jms.JMSResourceFactory;
 
 /**
  * Models a binding to a JMS resource.

Modified: incubator/tuscany/java/sca/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSBindingInvoker.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSBindingInvoker.java?rev=609149&r1=609148&r2=609149&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSBindingInvoker.java
(original)
+++ incubator/tuscany/java/sca/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSBindingInvoker.java
Sat Jan  5 07:09:57 2008
@@ -190,12 +190,20 @@
             Session session = jmsResourceFactory.createSession();
             try {
 
-                Destination replyToDest = (replyDest != null) ? replyDest : session.createTemporaryQueue();
+                Destination replyToDest;
+                if (operation.isNonBlocking()) {
+                    replyToDest = null;
+                } else {
+                    replyToDest = (replyDest != null) ? replyDest : session.createTemporaryQueue();
+                }
 
                 Message requestMsg = sendRequest((Object[])payload, session, replyToDest);
-                Message replyMsg = receiveReply(session, replyToDest, requestMsg.getJMSMessageID());
-
-                return ((Object[])responseMessageProcessor.extractPayloadFromJMSMessage(replyMsg))[0];
+                if (replyToDest == null) {
+                    return null;
+                } else {
+                    Message replyMsg = receiveReply(session, replyToDest, requestMsg.getJMSMessageID());
+                    return ((Object[])responseMessageProcessor.extractPayloadFromJMSMessage(replyMsg))[0];
+                }
 
             } finally {
                 session.close();

Modified: incubator/tuscany/java/sca/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSBindingReferenceBindingProvider.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSBindingReferenceBindingProvider.java?rev=609149&r1=609148&r2=609149&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSBindingReferenceBindingProvider.java
(original)
+++ incubator/tuscany/java/sca/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSBindingReferenceBindingProvider.java
Sat Jan  5 07:09:57 2008
@@ -80,9 +80,6 @@
             throw new JMSBindingException("No destination specified for reference " + reference.getName());
         }
 
-        if (jmsBinding.getResponseDestinationName().equals(JMSBindingConstants.DEFAULT_RESPONSE_DESTINATION_NAME))
{
-            throw new JMSBindingException("No response destination specified for reference
" + reference.getName());
-        }
         /* The following doesn't work as I can't get to the 
          * target list on the composite reference
                 // if the default destination queue name is set



---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org


Mime
View raw message