Search in sources :

Example 6 with JndiContext

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

the class AtomEntryPollingConsumerTest method createJndiContext.

@Override
protected Context createJndiContext() throws Exception {
    JndiContext jndi = new JndiContext();
    SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss Z");
    jndi.bind("myDate", df.parse("2007-11-13 14:35:00 +0100"));
    return jndi;
}
Also used : JndiContext(org.apache.camel.util.jndi.JndiContext) SimpleDateFormat(java.text.SimpleDateFormat)

Example 7 with JndiContext

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

the class AtomEntrySortTest method createJndiContext.

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

Example 8 with JndiContext

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

the class PredicateAsBeanTest method createJndiContext.

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

Example 9 with JndiContext

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

the class BeanToFileTest method createJndiContext.

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 10 with JndiContext

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

the class XsltReferenceParameterTest method setUp.

public void setUp() throws Exception {
    JndiRegistry registry = new JndiRegistry(new JndiContext());
    RouteBuilder builder = createRouteBuilder();
    CamelContext context = new DefaultCamelContext(registry);
    testConverter = new TestConverter();
    testTransformerFactory = TransformerFactory.newInstance();
    registry.bind("testConverter", testConverter);
    registry.bind("testTransformerFactory", testTransformerFactory);
    ProcessorEndpoint pep1 = context.getEndpoint(TEST_URI_1, ProcessorEndpoint.class);
    context.addRoutes(builder);
    context.start();
    builder1 = (XsltBuilder) pep1.getProcessor();
}
Also used : JndiRegistry(org.apache.camel.impl.JndiRegistry) CamelContext(org.apache.camel.CamelContext) DefaultCamelContext(org.apache.camel.impl.DefaultCamelContext) RouteBuilder(org.apache.camel.builder.RouteBuilder) JndiContext(org.apache.camel.util.jndi.JndiContext) ProcessorEndpoint(org.apache.camel.impl.ProcessorEndpoint) DefaultCamelContext(org.apache.camel.impl.DefaultCamelContext)

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