use of org.apache.camel.impl.JndiRegistry in project camel by apache.
the class ElSqlComponentTest method createRegistry.
@Override
protected JndiRegistry createRegistry() throws Exception {
JndiRegistry jndi = super.createRegistry();
// this is the database we create with some initial data for our unit test
db = new EmbeddedDatabaseBuilder().setType(EmbeddedDatabaseType.DERBY).addScript("sql/createAndPopulateDatabase.sql").build();
jndi.bind("dataSource", db);
return jndi;
}
use of org.apache.camel.impl.JndiRegistry in project camel by apache.
the class ElSqlConsumerTest method createRegistry.
@Override
protected JndiRegistry createRegistry() throws Exception {
JndiRegistry jndi = super.createRegistry();
// this is the database we create with some initial data for our unit test
db = new EmbeddedDatabaseBuilder().setType(EmbeddedDatabaseType.DERBY).addScript("sql/createAndPopulateDatabase.sql").build();
jndi.bind("dataSource", db);
return jndi;
}
use of org.apache.camel.impl.JndiRegistry in project camel by apache.
the class FlinkProducerTest method createRegistry.
@Override
protected JndiRegistry createRegistry() throws Exception {
JndiRegistry registry = super.createRegistry();
registry.bind("myDataSet", executionEnvironment.readTextFile("src/test/resources/testds.txt"));
registry.bind("myDataStream", streamExecutionEnvironment.readTextFile("src/test/resources/testds.txt"));
registry.bind("countLinesContaining", new DataSetCallback() {
@Override
public Object onDataSet(DataSet ds, Object... payloads) {
try {
return ds.count();
} catch (Exception e) {
return null;
}
}
});
return registry;
}
use of org.apache.camel.impl.JndiRegistry in project camel by apache.
the class FileToFtpsExplicitSSLWithoutClientAuthAndSSLContextParametersTest method createRegistry.
@Override
protected JndiRegistry createRegistry() throws Exception {
KeyStoreParameters ksp = new KeyStoreParameters();
ksp.setResource("server.jks");
ksp.setPassword("password");
TrustManagersParameters tmp = new TrustManagersParameters();
tmp.setKeyStore(ksp);
SSLContextParameters sslContextParameters = new SSLContextParameters();
sslContextParameters.setSecureSocketProtocol("SSL");
sslContextParameters.setTrustManagers(tmp);
JndiRegistry registry = super.createRegistry();
registry.bind("sslContextParameters", sslContextParameters);
return registry;
}
use of org.apache.camel.impl.JndiRegistry in project camel by apache.
the class FromFtpRemoteFileFilterTest method createRegistry.
@Override
protected JndiRegistry createRegistry() throws Exception {
JndiRegistry jndi = super.createRegistry();
jndi.bind("myFilter", new MyFileFilter<Object>());
return jndi;
}
Aggregations