diff options
-rw-r--r-- | java/sca/modules/binding-sca-jms/src/main/java/org/apache/tuscany/sca/binding/sca/jms/JMSSCABindingProviderFactory.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/java/sca/modules/binding-sca-jms/src/main/java/org/apache/tuscany/sca/binding/sca/jms/JMSSCABindingProviderFactory.java b/java/sca/modules/binding-sca-jms/src/main/java/org/apache/tuscany/sca/binding/sca/jms/JMSSCABindingProviderFactory.java index 21da1e5e92..87c9098737 100644 --- a/java/sca/modules/binding-sca-jms/src/main/java/org/apache/tuscany/sca/binding/sca/jms/JMSSCABindingProviderFactory.java +++ b/java/sca/modules/binding-sca-jms/src/main/java/org/apache/tuscany/sca/binding/sca/jms/JMSSCABindingProviderFactory.java @@ -51,6 +51,13 @@ public class JMSSCABindingProviderFactory implements BindingProviderFactory<Dist RuntimeComponentReference reference, DistributedSCABinding binding) { JMSBinding jmsBinding = createBinding(binding); + + // FIXME: CREATE_NEVER doesn't work as the dynamically created JNDI destinations + // aren't replicated around the broker cluster. Maybe it needs an AMQ specific + // impl of the Tuscany JMSResourceFactory which uses use physical destinations + // instead of JNDI + //jmsBinding.setDestinationCreate(JMSBindingConstants.CREATE_NEVER); + return new JMSBindingReferenceBindingProvider(component, reference, jmsBinding); } @@ -58,6 +65,7 @@ public class JMSSCABindingProviderFactory implements BindingProviderFactory<Dist RuntimeComponentService service, DistributedSCABinding binding) { JMSBinding jmsBinding = createBinding(binding); + jmsBinding.setDestinationCreate(JMSBindingConstants.CREATE_ALWAYS); return new JMSBindingServiceBindingProvider(component, service, binding.getSCABinding(), jmsBinding, workScheduler); } |