use of org.apache.camel.util.jndi.JndiContext in project camel by apache.
the class BeanLookupUsingJndiRegistryIssueTest method testCamelWithJndi.
public void testCamelWithJndi() throws Exception {
JndiContext jndi = new JndiContext();
jndi.bind("foo", new MyOtherDummyBean());
CamelContext camel = new DefaultCamelContext(jndi);
camel.addRoutes(new RouteBuilder() {
@Override
public void configure() throws Exception {
from("direct:start").bean("foo");
}
});
camel.start();
String reply = camel.createProducerTemplate().requestBody("direct:start", "Camel", String.class);
assertEquals("Hello Camel", reply);
camel.stop();
}
use of org.apache.camel.util.jndi.JndiContext in project camel by apache.
the class BeanExchangeAsReturnTypeNotAllowedTest method createJndiContext.
protected Context createJndiContext() throws Exception {
JndiContext answer = new JndiContext();
answer.bind("myBean", new MyBean());
return answer;
}
use of org.apache.camel.util.jndi.JndiContext in project camel by apache.
the class BeanImplicitMethodTest method createJndiContext.
@Override
protected Context createJndiContext() throws Exception {
JndiContext answer = new JndiContext();
answer.bind("myBean", new MyBean());
return answer;
}
use of org.apache.camel.util.jndi.JndiContext in project camel by apache.
the class SchedulerRouteTest method createJndiContext.
@Override
protected Context createJndiContext() throws Exception {
JndiContext answer = new JndiContext();
answer.bind("myBean", bean);
return answer;
}
use of org.apache.camel.util.jndi.JndiContext in project camel by apache.
the class RoutingSlipWithExceptionTest method createJndiContext.
@Override
protected Context createJndiContext() throws Exception {
JndiContext answer = new JndiContext();
answer.bind("myBean", myBean);
return answer;
}
Aggregations