org.apache.camel.impl.JndiRegistry Java Examples
The following examples show how to use
org.apache.camel.impl.JndiRegistry.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: JndiRegistryTest.java From camelinaction2 with Apache License 2.0 | 6 votes |
@Override protected void setUp() throws Exception { // create the registry to be JndiRegistry in standalone mode JndiRegistry registry = new JndiRegistry(true); // register our HelloBean under the name helloBean registry.bind("helloBean", new HelloBean()); // tell Camel to use our JndiRegistry context = new DefaultCamelContext(registry); // create a producer template to use for testing template = context.createProducerTemplate(); // add the route using an inlined RouteBuilder context.addRoutes(new RouteBuilder() { public void configure() throws Exception { from("direct:hello").bean("helloBean", "hello"); } }); // star Camel context.start(); }
Example #2
Source File: HttpsTest.java From camelinaction2 with Apache License 2.0 | 6 votes |
@Override protected JndiRegistry createRegistry() throws Exception { KeyStoreParameters ksp = new KeyStoreParameters(); ksp.setResource("./cia_keystore.jks"); ksp.setPassword("supersecret"); KeyManagersParameters kmp = new KeyManagersParameters(); kmp.setKeyPassword("secret"); kmp.setKeyStore(ksp); KeyStoreParameters tsp = new KeyStoreParameters(); tsp.setResource("./cia_truststore.jks"); tsp.setPassword("supersecret"); TrustManagersParameters tmp = new TrustManagersParameters(); tmp.setKeyStore(tsp); SSLContextParameters sslContextParameters = new SSLContextParameters(); sslContextParameters.setKeyManagers(kmp); sslContextParameters.setTrustManagers(tmp); JndiRegistry registry = super.createRegistry(); registry.bind("ssl", sslContextParameters); return registry; }
Example #3
Source File: PurchaseOrderJSONTest.java From camelinaction with Apache License 2.0 | 5 votes |
@Override protected JndiRegistry createRegistry() throws Exception { // register our service bean in the Camel registry JndiRegistry jndi = super.createRegistry(); jndi.bind("orderService", new OrderServiceBean()); return jndi; }
Example #4
Source File: RouteScopeTest.java From camelinaction2 with Apache License 2.0 | 5 votes |
@Override protected JndiRegistry createRegistry() throws Exception { // register our order service bean in the Camel registry JndiRegistry jndi = super.createRegistry(); jndi.bind("orderService", new OrderService()); return jndi; }
Example #5
Source File: ReuseErrorHandlerTest.java From camelinaction2 with Apache License 2.0 | 5 votes |
@Override protected JndiRegistry createRegistry() throws Exception { // register our order service bean in the Camel registry JndiRegistry jndi = super.createRegistry(); jndi.bind("orderService", new OrderService()); return jndi; }
Example #6
Source File: PurchaseOrderJSONTest.java From camelinaction2 with Apache License 2.0 | 5 votes |
@Override protected JndiRegistry createRegistry() throws Exception { // register our service bean in the Camel registry JndiRegistry jndi = super.createRegistry(); jndi.bind("orderService", new OrderServiceBean()); return jndi; }
Example #7
Source File: CbSailTest.java From rya with Apache License 2.0 | 5 votes |
@Override protected JndiRegistry createRegistry() throws Exception { store = new MockRdfCloudStore(); // store.setDisplayQueryPlan(true); // store.setInferencing(false); NamespaceManager nm = new NamespaceManager(store.getRyaDAO(), store.getConf()); store.setNamespaceManager(nm); repository = new RyaSailRepository(store); repository.initialize(); JndiRegistry registry = super.createRegistry(); registry.bind(Repository.class.getName(), repository); return registry; }
Example #8
Source File: JdbcTest.java From camelinaction with Apache License 2.0 | 5 votes |
protected JndiRegistry createRegistry() throws Exception { JndiRegistry jndi = super.createRegistry(); jndi.bind("orderToSql", new OrderToSqlBean()); DriverManagerDataSource ds = new DriverManagerDataSource(); ds.setDriverClassName("org.hsqldb.jdbcDriver"); ds.setUrl("jdbc:hsqldb:mem:order"); ds.setUsername("sa"); ds.setPassword(""); jndi.bind("dataSource", ds); return jndi; }
Example #9
Source File: StarterKitJavaProxyBuilderTest.java From camelinaction with Apache License 2.0 | 5 votes |
@Override protected JndiRegistry createRegistry() throws Exception { // bind the mocked bean with the riderMocked id JndiRegistry jndi = super.createRegistry(); jndi.bind("riderMocked", new RiderAutoPartsMock()); return jndi; }
Example #10
Source File: ComponentProxyComponentTest.java From syndesis with Apache License 2.0 | 5 votes |
@Override protected JndiRegistry createRegistry() throws Exception { Map<String, Object> properties = new HashMap<>(); properties.put("beanName", "my-bean"); ComponentProxyComponent component = new ComponentProxyComponent("my-bean-proxy", "bean"); component.setOptions(properties); JndiRegistry registry = super.createRegistry(); registry.bind("my-bean", new MyBean()); registry.bind(component.getComponentId() + "-component", component); return registry; }
Example #11
Source File: RouteScopeTest.java From camelinaction with Apache License 2.0 | 5 votes |
@Override protected JndiRegistry createRegistry() throws Exception { // register our order service bean in the Camel registry JndiRegistry jndi = super.createRegistry(); jndi.bind("orderService", new OrderService()); return jndi; }
Example #12
Source File: EnrichWithAggregatorTest.java From camel-cookbook-examples with Apache License 2.0 | 5 votes |
@Override protected JndiRegistry createRegistry() throws Exception { JndiRegistry jndiRegistry = super.createRegistry(); // register beanId for use by EnrichRoute // you could also use Spring or Blueprint 'bean' to create and configure // these references where the '<bean id="<ref id>">' jndiRegistry.bind("myMerger", new MergeInReplacementText()); return jndiRegistry; }
Example #13
Source File: EnrichTest.java From camel-cookbook-examples with Apache License 2.0 | 5 votes |
@Override protected JndiRegistry createRegistry() throws Exception { JndiRegistry jndiRegistry = super.createRegistry(); // register beanId for use by EnrichRoute // you could also use Spring or Blueprint 'bean' to create and configure // these references where the '<bean id="<ref id>">' jndiRegistry.bind("myExpander", new AbbreviationExpander()); return jndiRegistry; }
Example #14
Source File: CafeErrorTest.java From camel-cookbook-examples with Apache License 2.0 | 5 votes |
@Override protected JndiRegistry createRegistry() throws Exception { JndiRegistry registry = super.createRegistry(); registry.bind("menuService", new MenuService()); return registry; }
Example #15
Source File: CafeApiTest.java From camel-cookbook-examples with Apache License 2.0 | 5 votes |
@Override protected JndiRegistry createRegistry() throws Exception { JndiRegistry registry = super.createRegistry(); registry.bind("menuService", new MenuService()); return registry; }
Example #16
Source File: CafeTest.java From camel-cookbook-examples with Apache License 2.0 | 5 votes |
@Override protected JndiRegistry createRegistry() throws Exception { JndiRegistry registry = super.createRegistry(); registry.bind("menuService", new MenuService()); return registry; }
Example #17
Source File: BindingModeTest.java From camel-cookbook-examples with Apache License 2.0 | 5 votes |
@Override protected JndiRegistry createRegistry() throws Exception { final JndiRegistry registry = super.createRegistry(); registry.bind("itemService", new ItemService()); return registry; }
Example #18
Source File: InstallOpenTracingTracerRuleTest.java From java-specialagent with Apache License 2.0 | 5 votes |
@Override protected JndiRegistry createRegistry() throws Exception { final JndiRegistry registry = super.createRegistry(); // Add the mock tracer to the registry registry.bind("tracer", tracer); return registry; }
Example #19
Source File: MessageSigningWithKeyStoreParamsTest.java From camelinaction2 with Apache License 2.0 | 5 votes |
@Override protected JndiRegistry createRegistry() throws Exception { JndiRegistry registry = super.createRegistry(); KeyStoreParameters keystore = new KeyStoreParameters(); keystore.setPassword("supersecret"); keystore.setResource("./cia_keystore.jks"); registry.bind("keystore", keystore); KeyStoreParameters truststore = new KeyStoreParameters(); truststore.setPassword("supersecret"); truststore.setResource("./cia_truststore.jks"); registry.bind("truststore", truststore); return registry; }
Example #20
Source File: CamelHystrixTest.java From camelinaction2 with Apache License 2.0 | 5 votes |
@Override protected JndiRegistry createRegistry() throws Exception { JndiRegistry jndi = super.createRegistry(); // register the counter service jndi.bind("counter", new CounterService()); return jndi; }
Example #21
Source File: MessageEncryptionTest.java From camelinaction2 with Apache License 2.0 | 5 votes |
@Override protected JndiRegistry createRegistry() throws Exception { JndiRegistry registry = super.createRegistry(); KeyStoreParameters keystore = new KeyStoreParameters(); keystore.setPassword("supersecret"); keystore.setResource("./cia_secrets.jceks"); keystore.setType("JCEKS"); KeyStore store = keystore.createKeyStore(); secretKey = store.getKey("ciasecrets", "secret".toCharArray()); registry.bind("secretKey", secretKey); return registry; }
Example #22
Source File: CamelHystrixWithFallbackTest.java From camelinaction2 with Apache License 2.0 | 5 votes |
@Override protected JndiRegistry createRegistry() throws Exception { JndiRegistry jndi = super.createRegistry(); // register the counter service jndi.bind("counter", new CounterService()); return jndi; }
Example #23
Source File: JdbcTest.java From camelinaction2 with Apache License 2.0 | 5 votes |
protected JndiRegistry createRegistry() throws Exception { JndiRegistry jndi = super.createRegistry(); jndi.bind("orderToSql", new OrderToSqlBean()); DriverManagerDataSource ds = new DriverManagerDataSource(); ds.setDriverClassName("org.apache.derby.jdbc.EmbeddedDriver"); ds.setUrl("jdbc:derby:memory:order;create=true"); ds.setUsername("sa"); ds.setPassword(""); jndi.bind("dataSource", ds); return jndi; }
Example #24
Source File: OrderServiceTest.java From camelinaction2 with Apache License 2.0 | 5 votes |
@Override protected JndiRegistry createRegistry() throws Exception { JndiRegistry jndi = super.createRegistry(); // bidn the order service to the registry jndi.bind("orderService", orderService); // bind the jetty security handler to the registry jndi.bind("securityHandler", JettySecurity.createSecurityHandler()); return jndi; }
Example #25
Source File: MessageSigningTest.java From camelinaction2 with Apache License 2.0 | 5 votes |
@Override protected JndiRegistry createRegistry() throws Exception { JndiRegistry registry = super.createRegistry(); KeyStore keystore = loadKeystore("/cia_keystore.jks", "supersecret"); registry.bind("keystore", keystore); KeyStore truststore = loadKeystore("/cia_truststore.jks", "supersecret"); registry.bind("truststore", truststore); return registry; }
Example #26
Source File: SpringHandleFaultTest.java From camelinaction with Apache License 2.0 | 4 votes |
@Override protected JndiRegistry createRegistry() throws Exception { JndiRegistry jndi = super.createRegistry(); jndi.bind("orderService", new OrderService()); return jndi; }
Example #27
Source File: OrderServiceTest.java From camelinaction2 with Apache License 2.0 | 4 votes |
@Override protected JndiRegistry createRegistry() throws Exception { JndiRegistry jndi = super.createRegistry(); jndi.bind("orderService", orderService); return jndi; }
Example #28
Source File: OrderServiceTest.java From camelinaction2 with Apache License 2.0 | 4 votes |
@Override protected JndiRegistry createRegistry() throws Exception { JndiRegistry jndi = super.createRegistry(); jndi.bind("orderService", orderService); return jndi; }
Example #29
Source File: OrderServiceTest.java From camelinaction2 with Apache License 2.0 | 4 votes |
@Override protected JndiRegistry createRegistry() throws Exception { JndiRegistry jndi = super.createRegistry(); jndi.bind("orderService", orderService); return jndi; }
Example #30
Source File: DefaultErrorHandlerTest.java From camelinaction with Apache License 2.0 | 4 votes |
@Override protected JndiRegistry createRegistry() throws Exception { JndiRegistry jndi = super.createRegistry(); jndi.bind("orderService", new OrderService()); return jndi; }