Package org.mule.api

Examples of org.mule.api.MuleContext.start()


       
        ApplicationContext appContext = new ClassPathXmlApplicationContext("application-context.xml");
        ConfigurationBuilder builder = new SpringConfigurationBuilder(appContext);
        builder.configure(context);

        context.start();
       
        Object orange = context.getRegistry().lookupObject("orange");
        assertNotNull(orange);
        assertTrue(orange instanceof Orange);
        assertEquals("Pirulo", ((Orange) orange).getBrand());
View Full Code Here


        appContext = new ClassPathXmlApplicationContext("application-context-2.xml");
        builder = new SpringConfigurationBuilder(appContext);
        builder.configure(context);

        context.start();
       
        Object orange = context.getRegistry().lookupObject("orange");
        assertNotNull(orange);
        assertTrue(orange instanceof Orange);
        assertEquals("Tropicana", ((Orange) orange).getBrand());
View Full Code Here

        appContext = new ClassPathXmlApplicationContext("application-context.xml");
        builder = new SpringConfigurationBuilder(appContext);
        builder.configure(context);

        context.start();
       
        Object orange = context.getRegistry().lookupObject("orange");
        assertNotNull(orange);
        assertTrue(orange instanceof Orange);
        assertEquals("Pirulo", ((Orange) orange).getBrand());
View Full Code Here

       
        ApplicationContext appContext = new ClassPathXmlApplicationContext("application-context.xml");
        ConfigurationBuilder builder = new SpringConfigurationBuilder(appContext);
        builder.configure(context);

        context.start();
       
        Object orange = context.getRegistry().lookupObject("orange");
        assertNotNull(orange);
        assertTrue(orange instanceof Orange);
        assertEquals("Tutti Frutti", ((Orange) orange).getBrand());
View Full Code Here

        SpringXmlConfigurationBuilder builder = new SpringXmlConfigurationBuilder("mule-config.xml");
        builder.setParentContext(appContext);
        builder.configure(context);

        context.start();

        Object orange = context.getRegistry().lookupObject("orange");
        assertNotNull(orange);
        assertTrue(orange instanceof Orange);
        assertEquals("Pirulo", ((Orange) orange).getBrand());
View Full Code Here

        MuleContext context = new DefaultMuleContextFactory().createMuleContext();

        SpringXmlConfigurationBuilder builder = new SpringXmlConfigurationBuilder("application-context.xml, mule-config.xml");
        builder.configure(context);

        context.start();

        Object orange = context.getRegistry().lookupObject("orange");
        assertNotNull(orange);
        assertTrue(orange instanceof Orange);
        assertEquals("Pirulo", ((Orange) orange).getBrand());
View Full Code Here

    public void testDisposal() throws MuleException, InterruptedException
    {
        int threadsBeforeStart = Thread.activeCount();
        MuleContext ctx = new DefaultMuleContextFactory().createMuleContext();
        ctx.start();
        assertTrue(Thread.activeCount() > threadsBeforeStart);
        ctx.stop();
        ctx.dispose();
        // Check that workManager ("MuleServer") thread no longer exists.
        assertTrue(Thread.activeCount() == threadsBeforeStart);
View Full Code Here

    public void initialiseOnStarted() throws Exception
    {
        MuleContext ctx = ctxBuilder.buildMuleContext();
        ctx.initialise();
        new DefaultsConfigurationBuilder().configure(ctx);
        ctx.start();

        // Attempt to initialise once started should fail!
        ctx.initialise();
    }
View Full Code Here

    public void initialiseOnStopped() throws Exception
    {
        MuleContext ctx = ctxBuilder.buildMuleContext();
        ctx.initialise();
        new DefaultsConfigurationBuilder().configure(ctx);
        ctx.start();
        ctx.stop();
       
        // Attempt to initialise once stopped should fail!
        ctx.initialise();
    }
View Full Code Here

    public void initialiseOnDisposed() throws Exception
    {
        MuleContext ctx = ctxBuilder.buildMuleContext();
        ctx.initialise();
        new DefaultsConfigurationBuilder().configure(ctx);
        ctx.start();
        ctx.stop();
        ctx.dispose();

        // Attempt to initialise once disposed should fail!
        ctx.initialise();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.