Search in sources :

Example 91 with JndiRegistry

use of org.apache.camel.impl.JndiRegistry in project camel by apache.

the class RouteboxSedaTest method createRegistry.

@Override
protected JndiRegistry createRegistry() throws Exception {
    JndiRegistry registry = new JndiRegistry(createJndiContext());
    // Wire the inner context & dispatchStrategy to the outer camelContext where the routebox is declared
    registry.bind("ctx", createInnerContext());
    registry.bind("strategy", new SimpleRouteDispatchStrategy());
    return registry;
}
Also used : JndiRegistry(org.apache.camel.impl.JndiRegistry)

Example 92 with JndiRegistry

use of org.apache.camel.impl.JndiRegistry in project camel by apache.

the class SaxonExtensionFunctionsTest method createRegistry.

@Override
protected JndiRegistry createRegistry() throws Exception {
    JndiRegistry registry = new JndiRegistry(createJndiContext());
    registry.bind("function1", new MyExtensionFunction1());
    registry.bind("function2", new MyExtensionFunction2());
    return registry;
}
Also used : JndiRegistry(org.apache.camel.impl.JndiRegistry)

Example 93 with JndiRegistry

use of org.apache.camel.impl.JndiRegistry in project camel by apache.

the class Sjms2ComponentRestartTest method createRegistry.

@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;
}
Also used : ActiveMQConnectionFactory(org.apache.activemq.ActiveMQConnectionFactory) JndiRegistry(org.apache.camel.impl.JndiRegistry)

Example 94 with JndiRegistry

use of org.apache.camel.impl.JndiRegistry in project camel by apache.

the class SparkProducerTest method createRegistry.

// Routes fixtures
@Override
protected JndiRegistry createRegistry() throws Exception {
    JndiRegistry registry = super.createRegistry();
    registry.bind("testFileRdd", sparkContext.textFile("src/test/resources/testrdd.txt"));
    if (shouldRunHive) {
        registry.bind("hiveContext", hiveContext);
        DataFrame jsonCars = hiveContext.read().json("src/test/resources/cars.json");
        jsonCars.registerTempTable("cars");
        registry.bind("jsonCars", jsonCars);
    }
    registry.bind("countLinesTransformation", new org.apache.camel.component.spark.RddCallback() {

        @Override
        public Object onRdd(JavaRDDLike rdd, Object... payloads) {
            return rdd.count();
        }
    });
    return registry;
}
Also used : JndiRegistry(org.apache.camel.impl.JndiRegistry) JavaRDDLike(org.apache.spark.api.java.JavaRDDLike) DataFrame(org.apache.spark.sql.DataFrame)

Example 95 with JndiRegistry

use of org.apache.camel.impl.JndiRegistry in project camel by apache.

the class HttpsTwoComponentsSslContextParametersGetTest method createRegistry.

@Override
protected JndiRegistry createRegistry() throws Exception {
    JndiRegistry registry = super.createRegistry();
    registry.bind("x509HostnameVerifier", new AllowAllHostnameVerifier());
    registry.bind("sslContextParameters", new SSLContextParameters());
    registry.bind("sslContextParameters2", new SSLContextParameters());
    registry.bind("http4s-foo", new HttpComponent());
    registry.bind("http4s-bar", new HttpComponent());
    return registry;
}
Also used : JndiRegistry(org.apache.camel.impl.JndiRegistry) AllowAllHostnameVerifier(org.apache.http.conn.ssl.AllowAllHostnameVerifier) SSLContextParameters(org.apache.camel.util.jsse.SSLContextParameters)

Aggregations

JndiRegistry (org.apache.camel.impl.JndiRegistry)608 SSLContextParameters (org.apache.camel.util.jsse.SSLContextParameters)19 HttpUrlRewrite (org.apache.camel.component.urlrewrite.HttpUrlRewrite)18 KeyStoreParameters (org.apache.camel.util.jsse.KeyStoreParameters)17 DeadLetterChannelBuilder (org.apache.camel.builder.DeadLetterChannelBuilder)16 Properties (java.util.Properties)15 Test (org.junit.Test)14 TrustManagersParameters (org.apache.camel.util.jsse.TrustManagersParameters)13 ArrayList (java.util.ArrayList)11 KeyManagersParameters (org.apache.camel.util.jsse.KeyManagersParameters)11 EmbeddedDatabaseBuilder (org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseBuilder)11 File (java.io.File)10 RouteBuilder (org.apache.camel.builder.RouteBuilder)8 ExchangeCookieHandler (org.apache.camel.http.common.cookie.ExchangeCookieHandler)8 InstanceCookieHandler (org.apache.camel.http.common.cookie.InstanceCookieHandler)8 CamelContext (org.apache.camel.CamelContext)6 MockEndpoint (org.apache.camel.component.mock.MockEndpoint)6 BookCatalog (org.apache.camel.component.routebox.demo.BookCatalog)5 SimpleRouteBuilder (org.apache.camel.component.routebox.demo.SimpleRouteBuilder)5 DefaultCamelContext (org.apache.camel.impl.DefaultCamelContext)5