use of org.apache.camel.impl.JndiRegistry in project camel by apache.
the class SslContextParametersInUriCometdProducerConsumerTest method createRegistry.
@Override
protected JndiRegistry createRegistry() throws Exception {
KeyStoreParameters ksp = new KeyStoreParameters();
ksp.setResource("jsse/localhost.ks");
ksp.setPassword("changeit");
KeyManagersParameters kmp = new KeyManagersParameters();
kmp.setKeyPassword("changeit");
kmp.setKeyStore(ksp);
TrustManagersParameters tmp = new TrustManagersParameters();
tmp.setKeyStore(ksp);
SSLContextParameters sslContextParameters = new SSLContextParameters();
sslContextParameters.setKeyManagers(kmp);
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 DisruptorVmSplitterTest method createRegistry.
protected JndiRegistry createRegistry() throws Exception {
JndiRegistry jndi = super.createRegistry();
jndi.bind("splitterBean", new SplitWordsBean());
return jndi;
}
use of org.apache.camel.impl.JndiRegistry in project camel by apache.
the class EjbComponent method createEndpoint.
@Override
protected Endpoint createEndpoint(String uri, String remaining, Map<String, Object> parameters) throws Exception {
EjbEndpoint answer = new EjbEndpoint(uri, this);
answer.setBeanName(remaining);
// plugin registry to lookup in jndi for the EJBs
Registry registry = new JndiRegistry(getContext());
// and register the bean as a holder on the endpoint
BeanHolder holder = new EjbRegistryBean(registry, getCamelContext(), answer.getBeanName());
answer.setBeanHolder(holder);
return answer;
}
use of org.apache.camel.impl.JndiRegistry in project camel by apache.
the class GreaterCamelBeanTest method createRegistry.
@Override
protected JndiRegistry createRegistry() throws Exception {
Properties properties = new Properties();
properties.setProperty(Context.INITIAL_CONTEXT_FACTORY, "org.apache.openejb.client.LocalInitialContextFactory");
InitialContext initialContext = new InitialContext(properties);
return new JndiRegistry(initialContext);
}
use of org.apache.camel.impl.JndiRegistry in project camel by apache.
the class EhcacheConfigurationTest method createRegistry.
@Override
protected JndiRegistry createRegistry() throws Exception {
JndiRegistry registry = super.createRegistry();
registry.bind("myProgrammaticConfiguration", CacheConfigurationBuilder.newCacheConfigurationBuilder(String.class, String.class, ResourcePoolsBuilder.newResourcePoolsBuilder().heap(100, EntryUnit.ENTRIES).offheap(1, MemoryUnit.MB)).build());
return registry;
}
Aggregations