summaryrefslogtreecommitdiffstats
path: root/java/sca/modules/binding-jms-runtime
diff options
context:
space:
mode:
authorantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2008-09-03 08:20:25 +0000
committerantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2008-09-03 08:20:25 +0000
commit2c02c99885adce435d618803ff878513f0ea16ce (patch)
treecc2306808044b8747825c8be299acb783a4f9c01 /java/sca/modules/binding-jms-runtime
parenta56de7615f9f797a91c2790f38ad0b454b78a4e0 (diff)
Don't crash with an exception if an embedded broker is closed before stop is called on a JMS service
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@691539 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca/modules/binding-jms-runtime')
-rw-r--r--java/sca/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSBindingServiceBindingProvider.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/java/sca/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSBindingServiceBindingProvider.java b/java/sca/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSBindingServiceBindingProvider.java
index a84283be65..9f5bf68d13 100644
--- a/java/sca/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSBindingServiceBindingProvider.java
+++ b/java/sca/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSBindingServiceBindingProvider.java
@@ -124,7 +124,12 @@ public class JMSBindingServiceBindingProvider implements ServiceBindingProvider
consumer.close();
jmsResourceFactory.closeConnection();
} catch (Exception e) {
- throw new JMSBindingException("Error stopping JMSServiceBinding", e);
+ // if using an embedded broker then when shutting down Tuscany the broker may get closed
+ // before this stop method is called. I can't see how to detect that so for now just
+ // ignore the exception if the message is that the transport is already disposed
+ if (!"Transport disposed.".equals(e.getMessage())) {
+ throw new JMSBindingException("Error stopping JMSServiceBinding", e);
+ }
}
}