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;
}
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;
}
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;
}
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;
}
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;
}
Aggregations