Package org.mule.api

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


    {
        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);
        assertTrue(ctx.isDisposed());
        assertFalse(ctx.isInitialised());
View Full Code Here


    {
        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

    {
        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

        MuleContext ctx = ctxBuilder.buildMuleContext();
        ctx.initialise();
        new DefaultsConfigurationBuilder().configure(ctx);
        ctx.start();

        ctx.stop();
        ctx.start();
        assertTrue(ctx.isInitialised());
        assertFalse(ctx.isInitialising());
        assertTrue(ctx.isStarted());
        assertFalse(ctx.isDisposed());
View Full Code Here

    public void stopBeforeInitialise() throws Exception
    {
        MuleContext ctx = ctxBuilder.buildMuleContext();

        // Attempt to stop before initialise should fail!
        ctx.stop();
    }
    @Test(expected=IllegalStateException.class)
    public void stopOnInitialised() throws Exception
    {
View Full Code Here

    {
        MuleContext ctx = ctxBuilder.buildMuleContext();
        ctx.initialise();
       
        // cannot stop if not started
        ctx.stop();
    }
   
    @Test
    public void stopOnStarted() throws Exception
    {
View Full Code Here

    @Test
    public void stopOnStarted() throws Exception
    {
        MuleContext ctx = buildStartedMuleContext();
       
        ctx.stop();
        assertTrue(ctx.isInitialised());
        assertFalse(ctx.isInitialising());
        assertFalse(ctx.isStarted());
        assertFalse(ctx.isDisposed());
        assertFalse(ctx.isDisposing());
View Full Code Here

   
    @Test(expected=IllegalStateException.class)
    public void stopOnStopped() throws Exception
    {
        MuleContext ctx = buildStartedMuleContext();
        ctx.stop();
       
        // Can't call twice
        ctx.stop();
    }
   
View Full Code Here

    {
        MuleContext ctx = buildStartedMuleContext();
        ctx.stop();
       
        // Can't call twice
        ctx.stop();
    }
   
    @Test(expected=IllegalStateException.class)
    public void stopOnDisposed() throws Exception
    {
View Full Code Here

   
    @Test(expected=IllegalStateException.class)
    public void stopOnDisposed() throws Exception
    {
        MuleContext ctx = buildStartedMuleContext();
        ctx.stop();
        ctx.dispose();
       
        // Attempt to stop once disposed should fail!
        ctx.stop();
    }
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.