tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From antel...@apache.org
Subject svn commit: r985173 - in /tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms: host/DefaultJMSServiceListener.java provider/JMSBindingServiceBindingProvider.java provider/RRBJMSBindingInvoker.java
Date Fri, 13 Aug 2010 12:26:21 GMT
Author: antelder
Date: Fri Aug 13 12:26:21 2010
New Revision: 985173

URL: http://svn.apache.org/viewvc?rev=985173&view=rev
Log:
Don't do create-if-not-exist when using the jms:jndi: url format, and don't wrap jms exceptions
in another jms exception

Modified:
    tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/host/DefaultJMSServiceListener.java
    tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSBindingServiceBindingProvider.java
    tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/RRBJMSBindingInvoker.java

Modified: tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/host/DefaultJMSServiceListener.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/host/DefaultJMSServiceListener.java?rev=985173&r1=985172&r2=985173&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/host/DefaultJMSServiceListener.java
(original)
+++ tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/host/DefaultJMSServiceListener.java
Fri Aug 13 12:26:21 2010
@@ -73,6 +73,7 @@ public class DefaultJMSServiceListener i
         try {
             registerListerner();
         } catch (Exception e) {
+            if (e instanceof JMSBindingException) throw (JMSBindingException)e;
             throw new JMSBindingException("Error starting JMSServiceBinding", e);
         }
     }
@@ -188,7 +189,8 @@ public class DefaultJMSServiceListener i
 
         } else if (qCreateMode.equals(JMSBindingConstants.CREATE_IF_NOT_EXIST)) {
             // In this mode, the queue may nor may not exist. It will be created if it does
not exist
-            if (destination == null) {
+            // but don't create when using jms:jndi uri format
+            if (destination == null && !"jndi".equals(jmsBinding.getDestinationType()))
{
                 destination = jmsResourceFactory.createDestination(jmsBinding.getDestinationName());
             }
 

Modified: tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSBindingServiceBindingProvider.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/JMSBindingServiceBindingProvider.java?rev=985173&r1=985172&r2=985173&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSBindingServiceBindingProvider.java
(original)
+++ tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSBindingServiceBindingProvider.java
Fri Aug 13 12:26:21 2010
@@ -157,6 +157,7 @@ public class JMSBindingServiceBindingPro
             serviceListener.start();
             
         } catch (Exception e) {
+            if (e instanceof JMSBindingException) throw (JMSBindingException)e;
             throw new JMSBindingException("Error starting JMSServiceBinding", e);
         }
     }
@@ -165,6 +166,7 @@ public class JMSBindingServiceBindingPro
         try {
             serviceListener.stop();
         } catch (Exception e) {
+            if (e instanceof JMSBindingException) throw (JMSBindingException)e;
             throw new JMSBindingException("Error stopping JMSServiceBinding", e);
         }
     }

Modified: tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/RRBJMSBindingInvoker.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/RRBJMSBindingInvoker.java?rev=985173&r1=985172&r2=985173&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/RRBJMSBindingInvoker.java
(original)
+++ tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/RRBJMSBindingInvoker.java
Fri Aug 13 12:26:21 2010
@@ -153,7 +153,8 @@ public class RRBJMSBindingInvoker implem
 
         } else if (qCreateMode.equals(JMSBindingConstants.CREATE_IF_NOT_EXIST)) {
             // In this mode, the queue may nor may not exist. It will be created if it does
not exist
-            if (dest == null) {
+            // but don't create when using jms:jndi uri format
+            if (dest == null && !"jndi".equals(jmsBinding.getDestinationType()))
{
                 dest = jmsResourceFactory.createDestination(queueName);
             }
 



Mime
View raw message