tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From antel...@apache.org
Subject svn commit: r609169 - in /incubator/tuscany/branches/sca-java-1.1: itest/jms/src/main/java/org/apache/tuscany/sca/binding/jms/ itest/jms/src/main/resources/external/ itest/jms/src/main/resources/oneway/ itest/jms/src/main/resources/simple/ itest/jms/sr...
Date Sat, 05 Jan 2008 16:31:44 GMT
Author: antelder
Date: Sat Jan  5 08:31:43 2008
New Revision: 609169

URL: http://svn.apache.org/viewvc?rev=609169&view=rev
Log:
Merge jms changes in trunk from r609148 - 609120 to 1.1 branch

Added:
    incubator/tuscany/branches/sca-java-1.1/itest/jms/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayClientImpl.java
      - copied unchanged from r609166, incubator/tuscany/java/sca/itest/jms/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayClientImpl.java
    incubator/tuscany/branches/sca-java-1.1/itest/jms/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayService.java
      - copied unchanged from r609166, incubator/tuscany/java/sca/itest/jms/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayService.java
    incubator/tuscany/branches/sca-java-1.1/itest/jms/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayServiceImpl.java
      - copied unchanged from r609166, incubator/tuscany/java/sca/itest/jms/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayServiceImpl.java
    incubator/tuscany/branches/sca-java-1.1/itest/jms/src/main/resources/external/
      - copied from r609166, incubator/tuscany/java/sca/itest/jms/src/main/resources/external/
    incubator/tuscany/branches/sca-java-1.1/itest/jms/src/main/resources/external/client.composite
      - copied unchanged from r609166, incubator/tuscany/java/sca/itest/jms/src/main/resources/external/client.composite
    incubator/tuscany/branches/sca-java-1.1/itest/jms/src/main/resources/external/service.composite
      - copied unchanged from r609166, incubator/tuscany/java/sca/itest/jms/src/main/resources/external/service.composite
    incubator/tuscany/branches/sca-java-1.1/itest/jms/src/main/resources/oneway/
      - copied from r609166, incubator/tuscany/java/sca/itest/jms/src/main/resources/oneway/
    incubator/tuscany/branches/sca-java-1.1/itest/jms/src/main/resources/oneway/OneWayClient.composite
      - copied unchanged from r609166, incubator/tuscany/java/sca/itest/jms/src/main/resources/oneway/OneWayClient.composite
    incubator/tuscany/branches/sca-java-1.1/itest/jms/src/main/resources/oneway/OneWayService.composite
      - copied unchanged from r609166, incubator/tuscany/java/sca/itest/jms/src/main/resources/oneway/OneWayService.composite
    incubator/tuscany/branches/sca-java-1.1/itest/jms/src/test/java/org/apache/tuscany/sca/binding/jms/ExternalBrokerTestCase.java
      - copied unchanged from r609166, incubator/tuscany/java/sca/itest/jms/src/test/java/org/apache/tuscany/sca/binding/jms/ExternalBrokerTestCase.java
    incubator/tuscany/branches/sca-java-1.1/itest/jms/src/test/java/org/apache/tuscany/sca/binding/jms/OneWayTestCase.java
      - copied unchanged from r609166, incubator/tuscany/java/sca/itest/jms/src/test/java/org/apache/tuscany/sca/binding/jms/OneWayTestCase.java
    incubator/tuscany/branches/sca-java-1.1/modules/host-jms-activemq/src/main/java/org/apache/tuscany/sca/host/jms/activemq/ActiveMQBroker.java
      - copied unchanged from r609166, incubator/tuscany/java/sca/modules/host-jms-activemq/src/main/java/org/apache/tuscany/sca/host/jms/activemq/ActiveMQBroker.java
Removed:
    incubator/tuscany/branches/sca-java-1.1/modules/host-jms-activemq/src/main/java/org/apache/tuscany/sca/host/jms/activemq/ActiveMQHost.java
Modified:
    incubator/tuscany/branches/sca-java-1.1/itest/jms/src/main/resources/simple/client.composite
    incubator/tuscany/branches/sca-java-1.1/itest/jms/src/main/resources/simple/service.composite
    incubator/tuscany/branches/sca-java-1.1/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/impl/JMSBinding.java
    incubator/tuscany/branches/sca-java-1.1/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSBindingInvoker.java
    incubator/tuscany/branches/sca-java-1.1/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSBindingReferenceBindingProvider.java
    incubator/tuscany/branches/sca-java-1.1/modules/host-jms-activemq/src/main/java/org/apache/tuscany/sca/host/jms/activemq/ActiveMQModuleActivator.java
    incubator/tuscany/branches/sca-java-1.1/modules/host-jms-activemq/src/main/java/org/apache/tuscany/sca/host/jms/activemq/JMSResourceFactoryImpl.java

Modified: incubator/tuscany/branches/sca-java-1.1/itest/jms/src/main/resources/simple/client.composite
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-1.1/itest/jms/src/main/resources/simple/client.composite?rev=609169&r1=609168&r2=609169&view=diff
==============================================================================
--- incubator/tuscany/branches/sca-java-1.1/itest/jms/src/main/resources/simple/client.composite
(original)
+++ incubator/tuscany/branches/sca-java-1.1/itest/jms/src/main/resources/simple/client.composite
Sat Jan  5 08:31:43 2008
@@ -27,7 +27,7 @@
 
     <reference name="serviceA" promote="HelloWorldClient/serviceA">
         <interface.java interface="org.apache.tuscany.sca.binding.jms.HelloWorldService"
/>
-        <binding.jms initialContextFactory="org.apache.activemq.jndi.ActiveMQInitialContextFactory"
jndiURL="tcp://localhost:61616">
+        <binding.jms initialContextFactory="org.apache.activemq.jndi.ActiveMQInitialContextFactory"
jndiURL="tcp://localhost:61619">
             <destination name="DestQueueA"/>
             <response>
                <destination name="RespQueueA"/>

Modified: incubator/tuscany/branches/sca-java-1.1/itest/jms/src/main/resources/simple/service.composite
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-1.1/itest/jms/src/main/resources/simple/service.composite?rev=609169&r1=609168&r2=609169&view=diff
==============================================================================
--- incubator/tuscany/branches/sca-java-1.1/itest/jms/src/main/resources/simple/service.composite
(original)
+++ incubator/tuscany/branches/sca-java-1.1/itest/jms/src/main/resources/simple/service.composite
Sat Jan  5 08:31:43 2008
@@ -23,7 +23,7 @@
     <component name="HelloWorldService">
         <implementation.java class="org.apache.tuscany.sca.binding.jms.HelloWorldServiceImpl"/>
         <service name="HelloWorldService">
-            <binding.jms initialContextFactory="org.apache.activemq.jndi.ActiveMQInitialContextFactory"
jndiURL="tcp://localhost:61616">
+            <binding.jms initialContextFactory="org.apache.activemq.jndi.ActiveMQInitialContextFactory"
jndiURL="tcp://localhost:61619">
                <destination name="DestQueueA" create="always"/>
                <response>
                   <destination name="RespQueueA" create="always"/>

Modified: incubator/tuscany/branches/sca-java-1.1/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/impl/JMSBinding.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-1.1/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/impl/JMSBinding.java?rev=609169&r1=609168&r2=609169&view=diff
==============================================================================
--- incubator/tuscany/branches/sca-java-1.1/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/impl/JMSBinding.java
(original)
+++ incubator/tuscany/branches/sca-java-1.1/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/impl/JMSBinding.java
Sat Jan  5 08:31:43 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/branches/sca-java-1.1/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSBindingInvoker.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-1.1/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSBindingInvoker.java?rev=609169&r1=609168&r2=609169&view=diff
==============================================================================
--- incubator/tuscany/branches/sca-java-1.1/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSBindingInvoker.java
(original)
+++ incubator/tuscany/branches/sca-java-1.1/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSBindingInvoker.java
Sat Jan  5 08:31:43 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/branches/sca-java-1.1/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSBindingReferenceBindingProvider.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-1.1/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSBindingReferenceBindingProvider.java?rev=609169&r1=609168&r2=609169&view=diff
==============================================================================
--- incubator/tuscany/branches/sca-java-1.1/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSBindingReferenceBindingProvider.java
(original)
+++ incubator/tuscany/branches/sca-java-1.1/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSBindingReferenceBindingProvider.java
Sat Jan  5 08:31:43 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

Modified: incubator/tuscany/branches/sca-java-1.1/modules/host-jms-activemq/src/main/java/org/apache/tuscany/sca/host/jms/activemq/ActiveMQModuleActivator.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-1.1/modules/host-jms-activemq/src/main/java/org/apache/tuscany/sca/host/jms/activemq/ActiveMQModuleActivator.java?rev=609169&r1=609168&r2=609169&view=diff
==============================================================================
--- incubator/tuscany/branches/sca-java-1.1/modules/host-jms-activemq/src/main/java/org/apache/tuscany/sca/host/jms/activemq/ActiveMQModuleActivator.java
(original)
+++ incubator/tuscany/branches/sca-java-1.1/modules/host-jms-activemq/src/main/java/org/apache/tuscany/sca/host/jms/activemq/ActiveMQModuleActivator.java
Sat Jan  5 08:31:43 2008
@@ -24,7 +24,7 @@
 
 public class ActiveMQModuleActivator implements ModuleActivator {
 
-    private static ActiveMQHost activeMQHost;
+    private static ActiveMQBroker activeMQHost;
 
     public void start(ExtensionPointRegistry registry) {
     }
@@ -38,7 +38,7 @@
 
     public static void startBroker() {
         if (activeMQHost == null) {
-            activeMQHost = new ActiveMQHost();
+            activeMQHost = new ActiveMQBroker();
             activeMQHost.start();
         }
     }

Modified: incubator/tuscany/branches/sca-java-1.1/modules/host-jms-activemq/src/main/java/org/apache/tuscany/sca/host/jms/activemq/JMSResourceFactoryImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-1.1/modules/host-jms-activemq/src/main/java/org/apache/tuscany/sca/host/jms/activemq/JMSResourceFactoryImpl.java?rev=609169&r1=609168&r2=609169&view=diff
==============================================================================
--- incubator/tuscany/branches/sca-java-1.1/modules/host-jms-activemq/src/main/java/org/apache/tuscany/sca/host/jms/activemq/JMSResourceFactoryImpl.java
(original)
+++ incubator/tuscany/branches/sca-java-1.1/modules/host-jms-activemq/src/main/java/org/apache/tuscany/sca/host/jms/activemq/JMSResourceFactoryImpl.java
Sat Jan  5 08:31:43 2008
@@ -36,9 +36,10 @@
  */
 public class JMSResourceFactoryImpl implements JMSResourceFactory {
 
-    private String initialContextFactoryName = "org.apache.activemq.jndi.ActiveMQInitialContextFactory";
+    private static final String DEFAULT_ICFN = "org.apache.activemq.jndi.ActiveMQInitialContextFactory";
+    private String initialContextFactoryName = DEFAULT_ICFN;
     private String connectionFactoryName = "ConnectionFactory";
-    private String jndiURL = "tcp://localhost:61616";
+    private String jndiURL = ActiveMQBroker.CONNECTOR_URL;
     
     private Connection connection;
     private Context context;
@@ -103,8 +104,18 @@
     }
 
     public void startBroker() {
-        // ensure the broker has been started
-        ActiveMQModuleActivator.startBroker();
+        if (isEmbedded()) {
+            // ensure the broker has been started
+            ActiveMQModuleActivator.startBroker();
+        }
+    }
+
+    /**
+     * TODO: need to find a way to determine whether or not need to start the embedded broker
+     * for now it always starts it if the activemq icf is being used with our default jndiurl
+     */
+    protected boolean isEmbedded() {
+        return DEFAULT_ICFN.equals(initialContextFactoryName) && ActiveMQBroker.CONNECTOR_URL.equals(jndiURL);
     }
 
     private void createConnection() throws NamingException, JMSException {



---------------------------------------------------------------------
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