Search in sources :

Example 21 with JndiContext

use of org.apache.camel.util.jndi.JndiContext in project camel by apache.

the class BeanWithAnnotationInheritedTest method createJndiContext.

protected Context createJndiContext() throws Exception {
    JndiContext answer = new JndiContext();
    answer.bind("b", new B());
    answer.bind("p", Proxy.newProxyInstance(I1.class.getClassLoader(), new Class[] { I1.class }, new InvocationHandler() {

        @Override
        public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
            if (method.getName().equals("m1")) {
                return args[0].toString() + args[1].toString();
            } else {
                return null;
            }
        }
    }));
    return answer;
}
Also used : JndiContext(org.apache.camel.util.jndi.JndiContext) Method(java.lang.reflect.Method) InvocationHandler(java.lang.reflect.InvocationHandler)

Example 22 with JndiContext

use of org.apache.camel.util.jndi.JndiContext in project camel by apache.

the class BeanWithPropertiesAndHeadersInjectionTest method createJndiContext.

@Override
protected Context createJndiContext() throws Exception {
    JndiContext answer = new JndiContext();
    answer.bind("myBean", myBean);
    return answer;
}
Also used : JndiContext(org.apache.camel.util.jndi.JndiContext)

Example 23 with JndiContext

use of org.apache.camel.util.jndi.JndiContext in project camel by apache.

the class BeanWithXPathInjectionUsingHeaderValueTest method createJndiContext.

@Override
protected Context createJndiContext() throws Exception {
    JndiContext answer = new JndiContext();
    answer.bind("myBean", myBean);
    return answer;
}
Also used : JndiContext(org.apache.camel.util.jndi.JndiContext)

Example 24 with JndiContext

use of org.apache.camel.util.jndi.JndiContext in project camel by apache.

the class BeanWithJXPathInjectionTest method createJndiContext.

@Override
protected Context createJndiContext() throws Exception {
    JndiContext answer = new JndiContext();
    answer.bind("myBean", new MyBean());
    return answer;
}
Also used : JndiContext(org.apache.camel.util.jndi.JndiContext)

Example 25 with JndiContext

use of org.apache.camel.util.jndi.JndiContext in project camel by apache.

the class SimulatorTest method createJndiContext.

protected Context createJndiContext() throws Exception {
    JndiContext answer = new JndiContext();
    answer.bind("foo", new MyBean("foo"));
    answer.bind("bar", new MyBean("bar"));
    return answer;
}
Also used : JndiContext(org.apache.camel.util.jndi.JndiContext)

Aggregations

JndiContext (org.apache.camel.util.jndi.JndiContext)75 ConnectionFactory (javax.jms.ConnectionFactory)16 JmsComponent (org.apache.camel.component.jms.JmsComponent)16 CamelContext (org.apache.camel.CamelContext)6 DefaultCamelContext (org.apache.camel.impl.DefaultCamelContext)3 ArrayList (java.util.ArrayList)2 RouteBuilder (org.apache.camel.builder.RouteBuilder)2 InvocationHandler (java.lang.reflect.InvocationHandler)1 Method (java.lang.reflect.Method)1 SimpleDateFormat (java.text.SimpleDateFormat)1 Calendar (java.util.Calendar)1 Endpoint (org.apache.camel.Endpoint)1 JndiRegistry (org.apache.camel.impl.JndiRegistry)1 ProcessorEndpoint (org.apache.camel.impl.ProcessorEndpoint)1 IoFilter (org.apache.mina.common.IoFilter)1 IoFilter (org.apache.mina.core.filterchain.IoFilter)1 Test (org.junit.Test)1