Search in sources :

Example 1 with Jt400Endpoint

use of org.apache.camel.component.jt400.Jt400Endpoint in project wildfly-camel by wildfly-extras.

the class AS400IntegrationTest method testToString.

@Test
public void testToString() throws Exception {
    String endpointUri = "jt400://user:password@host/qsys.lib/library.lib/queue.dtaq?ccsid=500&format=binary&connectionPool=#mockPool";
    WildFlyCamelContext camelctx = new WildFlyCamelContext();
    camelctx.getNamingContext().bind("mockPool", new AS400ConnectionPool());
    camelctx.addRoutes(new RouteBuilder() {

        @Override
        public void configure() throws Exception {
            from(endpointUri).to("mock:end");
        }
    });
    Jt400Endpoint endpoint = camelctx.getEndpoint(endpointUri, Jt400Endpoint.class);
    Assert.assertEquals("host", endpoint.getSystemName());
}
Also used : Jt400Endpoint(org.apache.camel.component.jt400.Jt400Endpoint) AS400ConnectionPool(com.ibm.as400.access.AS400ConnectionPool) RouteBuilder(org.apache.camel.builder.RouteBuilder) WildFlyCamelContext(org.wildfly.extension.camel.WildFlyCamelContext) Test(org.junit.Test)

Aggregations

AS400ConnectionPool (com.ibm.as400.access.AS400ConnectionPool)1 RouteBuilder (org.apache.camel.builder.RouteBuilder)1 Jt400Endpoint (org.apache.camel.component.jt400.Jt400Endpoint)1 Test (org.junit.Test)1 WildFlyCamelContext (org.wildfly.extension.camel.WildFlyCamelContext)1