You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2019/08/02 06:33:53 UTC

[camel] 01/02: CAMEL-13801 - camel3 - Use @BindToRegistry wherever possible, Camel-Thrift

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 45f55dd086989f609bdfec3b1bedbefcecf35e5c
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Fri Aug 2 08:33:08 2019 +0200

    CAMEL-13801 - camel3 - Use @BindToRegistry wherever possible, Camel-Thrift
---
 .../camel/component/thrift/ThriftConsumerSecurityTest.java     | 10 ++++++----
 .../camel/component/thrift/ThriftProducerSecurityTest.java     | 10 ++++++----
 2 files changed, 12 insertions(+), 8 deletions(-)

diff --git a/components/camel-thrift/src/test/java/org/apache/camel/component/thrift/ThriftConsumerSecurityTest.java b/components/camel-thrift/src/test/java/org/apache/camel/component/thrift/ThriftConsumerSecurityTest.java
index 978d67a..96f1df0 100644
--- a/components/camel-thrift/src/test/java/org/apache/camel/component/thrift/ThriftConsumerSecurityTest.java
+++ b/components/camel-thrift/src/test/java/org/apache/camel/component/thrift/ThriftConsumerSecurityTest.java
@@ -24,6 +24,8 @@ import org.apache.camel.component.thrift.generated.Calculator;
 import org.apache.camel.component.thrift.generated.Operation;
 import org.apache.camel.component.thrift.generated.Work;
 import org.apache.camel.impl.JndiRegistry;
+import org.apache.camel.spi.Registry;
+import org.apache.camel.support.SimpleRegistry;
 import org.apache.camel.support.jsse.KeyManagersParameters;
 import org.apache.camel.support.jsse.KeyStoreParameters;
 import org.apache.camel.support.jsse.SSLContextParameters;
@@ -81,8 +83,8 @@ public class ThriftConsumerSecurityTest extends CamelTestSupport {
     }
     
     @Override
-    protected JndiRegistry createRegistry() throws Exception {
-        JndiRegistry jndi = super.createRegistry();
+    protected Registry createCamelRegistry() throws Exception {
+        Registry reg = new SimpleRegistry();
         SSLContextParameters sslParameters = new SSLContextParameters();
         
         KeyStoreParameters keyStoreParams = new KeyStoreParameters();
@@ -94,8 +96,8 @@ public class ThriftConsumerSecurityTest extends CamelTestSupport {
         
         sslParameters.setKeyManagers(keyManagerParams);
         
-        jndi.bind("sslParams", sslParameters);
-        return jndi;
+        reg.bind("sslParams", sslParameters);
+        return reg;
     }
     
     @Test
diff --git a/components/camel-thrift/src/test/java/org/apache/camel/component/thrift/ThriftProducerSecurityTest.java b/components/camel-thrift/src/test/java/org/apache/camel/component/thrift/ThriftProducerSecurityTest.java
index 29eae88..d5f83b9 100644
--- a/components/camel-thrift/src/test/java/org/apache/camel/component/thrift/ThriftProducerSecurityTest.java
+++ b/components/camel-thrift/src/test/java/org/apache/camel/component/thrift/ThriftProducerSecurityTest.java
@@ -32,6 +32,8 @@ import org.apache.camel.component.thrift.generated.Operation;
 import org.apache.camel.component.thrift.generated.Work;
 import org.apache.camel.component.thrift.impl.CalculatorSyncServerImpl;
 import org.apache.camel.impl.JndiRegistry;
+import org.apache.camel.spi.Registry;
+import org.apache.camel.support.SimpleRegistry;
 import org.apache.camel.support.jsse.KeyStoreParameters;
 import org.apache.camel.support.jsse.SSLContextParameters;
 import org.apache.camel.support.jsse.TrustManagersParameters;
@@ -96,8 +98,8 @@ public class ThriftProducerSecurityTest extends CamelTestSupport {
     }
     
     @Override
-    protected JndiRegistry createRegistry() throws Exception {
-        JndiRegistry jndi = super.createRegistry();        
+    protected Registry createCamelRegistry() throws Exception {
+        Registry reg = new SimpleRegistry();        
         SSLContextParameters sslParameters = new SSLContextParameters();
         
         KeyStoreParameters keyStoreParams = new KeyStoreParameters();
@@ -109,8 +111,8 @@ public class ThriftProducerSecurityTest extends CamelTestSupport {
         
         sslParameters.setTrustManagers(trustManagerParams);
         
-        jndi.bind("sslParams", sslParameters);
-        return jndi;
+        reg.bind("sslParams", sslParameters);
+        return reg;
     }
     
     @Test