summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/modules
diff options
context:
space:
mode:
Diffstat (limited to 'sca-java-2.x/trunk/modules')
-rw-r--r--sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/host/DefaultJMSServiceListener.java4
-rw-r--r--sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSBindingServiceBindingProvider.java2
-rw-r--r--sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/RRBJMSBindingInvoker.java3
3 files changed, 7 insertions, 2 deletions
diff --git a/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/host/DefaultJMSServiceListener.java b/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/host/DefaultJMSServiceListener.java
index 2f5d2e2632..aca0d58697 100644
--- a/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/host/DefaultJMSServiceListener.java
+++ b/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/host/DefaultJMSServiceListener.java
@@ -73,6 +73,7 @@ public class DefaultJMSServiceListener implements JMSServiceListener {
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 implements JMSServiceListener {
} 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());
}
diff --git a/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSBindingServiceBindingProvider.java b/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSBindingServiceBindingProvider.java
index e842baaf6d..a133cce5d4 100644
--- a/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSBindingServiceBindingProvider.java
+++ b/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSBindingServiceBindingProvider.java
@@ -157,6 +157,7 @@ public class JMSBindingServiceBindingProvider implements EndpointProvider, JMSSe
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 JMSBindingServiceBindingProvider implements EndpointProvider, JMSSe
try {
serviceListener.stop();
} catch (Exception e) {
+ if (e instanceof JMSBindingException) throw (JMSBindingException)e;
throw new JMSBindingException("Error stopping JMSServiceBinding", e);
}
}
diff --git a/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/RRBJMSBindingInvoker.java b/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/RRBJMSBindingInvoker.java
index 0f4f88dcd8..b578d7e2a5 100644
--- a/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/RRBJMSBindingInvoker.java
+++ b/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/RRBJMSBindingInvoker.java
@@ -153,7 +153,8 @@ public class RRBJMSBindingInvoker implements Invoker {
} 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);
}