Package org.osgi.service.blueprint.container

Examples of org.osgi.service.blueprint.container.BlueprintContainer



    @Test
    public void testInsert() throws Exception {
        getInstalledBundle("CamelBlueprintSqlTestBundle").start();
        BlueprintContainer ctn = getOsgiService(BlueprintContainer.class, "(osgi.blueprint.container.symbolicname=CamelBlueprintSqlTestBundle)", 10000);
        CamelContext ctx = getOsgiService(CamelContext.class, "(camel.context.symbolicname=CamelBlueprintSqlTestBundle)", 10000);
        DataSource ds = getOsgiService(DataSource.class, 10000);
        JdbcTemplate jdbcTemplate = new JdbcTemplate(ds);
        ProducerTemplate template = ctx.createProducerTemplate();
        MockEndpoint mock = (MockEndpoint) ctx.getEndpoint("mock:result");
View Full Code Here


    @Test
    public void testProducerAndConsumer() throws Exception {
        BlobStore blobStore = getOsgiService(BlobStore.class);
        getInstalledBundle("CamelBlueprintJcloudsTestBundle").start();
        BlueprintContainer ctn = getOsgiService(BlueprintContainer.class, "(osgi.blueprint.container.symbolicname=CamelBlueprintJcloudsTestBundle)", 20000);
        CamelContext ctx = getOsgiService(CamelContext.class, "(camel.context.symbolicname=CamelBlueprintJcloudsTestBundle)", 20000);

        MockEndpoint mock = (MockEndpoint) ctx.getEndpoint("mock:results");
        ProducerTemplate template = ctx.createProducerTemplate();
        mock.expectedMessageCount(2);
View Full Code Here

public class JpaBlueprintRouteTest extends OSGiBlueprintTestSupport {

    @Test
    public void testBlueprintRouteJpa() throws Exception {
        getInstalledBundle("CamelBlueprintJpaTestBundle").start();
        BlueprintContainer ctn = getOsgiService(BlueprintContainer.class, "(osgi.blueprint.container.symbolicname=CamelBlueprintJpaTestBundle)", 20000);
        CamelContext ctx = getOsgiService(CamelContext.class, "(camel.context.symbolicname=CamelBlueprintJpaTestBundle)", 20000);

        MockEndpoint mock = (MockEndpoint) ctx.getEndpoint("mock:result");
        mock.expectedMessageCount(1);
View Full Code Here

public class CamelBlueprint4Test extends OSGiBlueprintTestSupport {

    @Test
    public void testRouteWithXSLT() throws Exception {
        getInstalledBundle("CamelBlueprintTestBundle19").start();
        BlueprintContainer ctn = getOsgiService(BlueprintContainer.class, "(osgi.blueprint.container.symbolicname=CamelBlueprintTestBundle19)", 10000);
        CamelContext ctx = getOsgiService(CamelContext.class, "(camel.context.symbolicname=CamelBlueprintTestBundle19)", 10000);

        ProducerTemplate template = ctx.createProducerTemplate();

        MockEndpoint mock = ctx.getEndpoint("mock:result", MockEndpoint.class);
View Full Code Here

    }

    @Test
    public void testRouteWithVelocity() throws Exception {
        getInstalledBundle("CamelBlueprintTestBundle20").start();
        BlueprintContainer ctn = getOsgiService(BlueprintContainer.class, "(osgi.blueprint.container.symbolicname=CamelBlueprintTestBundle20)", 10000);
        CamelContext ctx = getOsgiService(CamelContext.class, "(camel.context.symbolicname=CamelBlueprintTestBundle20)", 10000);

        ProducerTemplate template = ctx.createProducerTemplate();
        Object out = template.requestBody("direct:a", "world");
        assertEquals("<hello>world</hello>", out);
View Full Code Here

    }

    @Test
    public void testSetHeaderXPathResultType() throws Exception {
        getInstalledBundle("CamelBlueprintTestBundle21").start();
        BlueprintContainer ctn = getOsgiService(BlueprintContainer.class, "(osgi.blueprint.container.symbolicname=CamelBlueprintTestBundle21)", 10000);
        CamelContext ctx = getOsgiService(CamelContext.class, "(camel.context.symbolicname=CamelBlueprintTestBundle21)", 10000);

        ProducerTemplate template = ctx.createProducerTemplate();

        MockEndpoint mock = ctx.getEndpoint("mock:result", MockEndpoint.class);
View Full Code Here

    }

    @Test
    public void testGetApplicationContextClassloader() throws Exception {
        getInstalledBundle("CamelBlueprintTestBundle22").start();
        BlueprintContainer ctn = getOsgiService(BlueprintContainer.class, "(osgi.blueprint.container.symbolicname=CamelBlueprintTestBundle22)", 10000);
        CamelContext ctx = getOsgiService(CamelContext.class, "(camel.context.symbolicname=CamelBlueprintTestBundle22)", 10000);

        // test the application context classloader
        assertNotNull("The application context classloader should not be null", ctx.getApplicationContextClassLoader());
        ClassLoader cl = ctx.getApplicationContextClassLoader();
View Full Code Here

    private static final String BUNDLE_SYMBOLICNAME = "CamelBlueprintTcclTestBundle";

    @Test
    public void testCorrectTcclSetForRoutes() throws Exception {
        BlueprintContainer ctn = getOsgiService(BlueprintContainer.class, "(osgi.blueprint.container.symbolicname=CamelBlueprintTcclTestBundle)", 10000);
        CamelContext ctx = getOsgiService(CamelContext.class, "(camel.context.symbolicname=CamelBlueprintTcclTestBundle)", 10000);
        assertBundleDelegatingClassLoader(ctx.getApplicationContextClassLoader());

        ProducerTemplate template = ctx.createProducerTemplate();
View Full Code Here

    protected BundleContext bundleContext;

    @Test
    public void testProducerConsumerAndIdempotent() throws Exception {
        getInstalledBundle("CamelBlueprintKratiTestBundle").start();
        BlueprintContainer ctn = getOsgiService(BlueprintContainer.class, "(osgi.blueprint.container.symbolicname=CamelBlueprintKratiTestBundle)", 10000);
        CamelContext ctx = getOsgiService(CamelContext.class, "(camel.context.symbolicname=CamelBlueprintKratiTestBundle)", 10000);
        MockEndpoint mock = (MockEndpoint) ctx.getEndpoint("mock:results");
        ProducerTemplate template = ctx.createProducerTemplate();
        mock.expectedMessageCount(2);
        template.sendBodyAndHeader("direct:put", new SomeObject("1", "Test 1"), KratiConstants.KEY, "1");
View Full Code Here

    }

    @Test
    public void testRouteWithComponentFromBlueprint() throws Exception {
        getInstalledBundle("CamelBlueprintTestBundle6").start();
        BlueprintContainer ctn = getOsgiService(BlueprintContainer.class, "(osgi.blueprint.container.symbolicname=CamelBlueprintTestBundle6)", 10000);
        CamelContext ctx = getOsgiService(CamelContext.class, "(camel.context.symbolicname=CamelBlueprintTestBundle6)", 10000);
        assertEquals(1, ctx.getRoutes().size());
        assertSame(ctn.getComponentInstance("seda"), ctx.getComponent("seda"));
    }
View Full Code Here

TOP

Related Classes of org.osgi.service.blueprint.container.BlueprintContainer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.