This is an automated email from the ASF dual-hosted git repository. acosentino pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel.git
commit 41409b24456a029d69b84687cc62c14a343b772e Author: Andrea Cosentino <anco...@gmail.com> AuthorDate: Wed Jul 31 09:52:02 2019 +0200 CAMEL-13801 - camel3 - Use @BindToRegistry wherever possible, Camel-Sjms --- .../camel/component/sjms/SjmsComponentRestartTest.java | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/components/camel-sjms/src/test/java/org/apache/camel/component/sjms/SjmsComponentRestartTest.java b/components/camel-sjms/src/test/java/org/apache/camel/component/sjms/SjmsComponentRestartTest.java index 334d06e..5637f3b 100644 --- a/components/camel-sjms/src/test/java/org/apache/camel/component/sjms/SjmsComponentRestartTest.java +++ b/components/camel-sjms/src/test/java/org/apache/camel/component/sjms/SjmsComponentRestartTest.java @@ -19,6 +19,7 @@ package org.apache.camel.component.sjms; import javax.jms.ConnectionFactory; import org.apache.activemq.ActiveMQConnectionFactory; +import org.apache.camel.BindToRegistry; import org.apache.camel.builder.RouteBuilder; import org.apache.camel.impl.JndiRegistry; import org.apache.camel.test.junit4.CamelTestSupport; @@ -26,20 +27,14 @@ import org.junit.Test; public class SjmsComponentRestartTest extends CamelTestSupport { + @BindToRegistry("activemqCF") + private ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory("vm://broker?broker.persistent=false&broker.useJmx=false"); + @Override public boolean isUseRouteBuilder() { return false; } - @Override - protected JndiRegistry createRegistry() throws Exception { - ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory("vm://broker?broker.persistent=false&broker.useJmx=false"); - - JndiRegistry jndi = super.createRegistry(); - jndi.bind("activemqCF", connectionFactory); - return jndi; - } - @Test public void testRestartWithStopStart() throws Exception { SjmsComponent sjmsComponent = new SjmsComponent();