diff options
Diffstat (limited to 'java/sca/modules/binding-jms-runtime/src')
-rw-r--r-- | java/sca/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSBindingServiceBindingProvider.java | 7 |
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); + } } } |