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 106c3940de1a82e4c0dcd79cf1db0aef780648ea Author: Andrea Cosentino <anco...@gmail.com> AuthorDate: Mon Jul 29 15:57:09 2019 +0200 Camel-Mllp: Use BindToRegistry annotation wherever possible --- .../component/mllp/MllpTcpServerConsumerTransactionTest.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/components/camel-mllp/src/test/java/org/apache/camel/component/mllp/MllpTcpServerConsumerTransactionTest.java b/components/camel-mllp/src/test/java/org/apache/camel/component/mllp/MllpTcpServerConsumerTransactionTest.java index 59ab2cf..2963d35 100644 --- a/components/camel-mllp/src/test/java/org/apache/camel/component/mllp/MllpTcpServerConsumerTransactionTest.java +++ b/components/camel-mllp/src/test/java/org/apache/camel/component/mllp/MllpTcpServerConsumerTransactionTest.java @@ -20,6 +20,7 @@ import java.util.concurrent.TimeUnit; import org.apache.activemq.ActiveMQConnectionFactory; import org.apache.activemq.junit.EmbeddedActiveMQBroker; +import org.apache.camel.BindToRegistry; import org.apache.camel.CamelContext; import org.apache.camel.EndpointInject; import org.apache.camel.LoggingLevel; @@ -61,15 +62,13 @@ public class MllpTcpServerConsumerTransactionTest extends CamelTestSupport { return context; } - @Override - protected JndiRegistry createRegistry() throws Exception { - JndiRegistry registry = super.createRegistry(); + @BindToRegistry("target") + public SjmsComponent addTargetComponent() throws Exception { SjmsComponent target = new SjmsComponent(); target.setConnectionFactory(new ActiveMQConnectionFactory(broker.getVmURL())); - registry.bind("target", target); - return registry; + return target; } @Override