Search in sources :

Example 1 with JndiRegistry

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;
}
Also used : KeyManagersParameters(org.apache.camel.util.jsse.KeyManagersParameters) JndiRegistry(org.apache.camel.impl.JndiRegistry) TrustManagersParameters(org.apache.camel.util.jsse.TrustManagersParameters) KeyStoreParameters(org.apache.camel.util.jsse.KeyStoreParameters) SSLContextParameters(org.apache.camel.util.jsse.SSLContextParameters)

Example 2 with JndiRegistry

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

Example 3 with JndiRegistry

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;
}
Also used : JndiRegistry(org.apache.camel.impl.JndiRegistry) BeanHolder(org.apache.camel.component.bean.BeanHolder) Registry(org.apache.camel.spi.Registry) JndiRegistry(org.apache.camel.impl.JndiRegistry)

Example 4 with JndiRegistry

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);
}
Also used : JndiRegistry(org.apache.camel.impl.JndiRegistry) Properties(java.util.Properties) InitialContext(javax.naming.InitialContext)

Example 5 with JndiRegistry

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

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