Package org.mule.api

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


        ctx.getRegistry().registerObject(UUID.getUUID(), securityManager);
       
        QueueManager queueManager = Mockito.mock(QueueManager.class);
        ctx.getRegistry().registerObject(UUID.getUUID(), queueManager);
       
        ctx.start();
        return ctx;
    }

    private void assertLifecycleManagerDidApplyPhases(String... phaseNames)
    {
View Full Code Here


            "org/mule/test/spring/mule-root-test.xml");
        MuleContextFactory muleContextFactory = new DefaultMuleContextFactory();
        MuleContext context = muleContextFactory.createMuleContext(builder);
        // MuleContext must be started explicitly after MULE-1988
        assertFalse(context.isStarted());
        context.start();
        assertTrue(context.isStarted());

        final EndpointBuilder endpoint = context.getRegistry().lookupEndpointBuilder("endpoint");
        assertNotNull(endpoint);
        assertEquals("test://value", endpoint.buildInboundEndpoint().getEndpointURI().toString());
View Full Code Here

    setProperty("ebms.protocol",new String[]{"http","https"},"http");
    setProperty("ebms.database",new String[]{"hsqldb","mysql","postgresql","mssql","oracle"},"hsqldb");
    DefaultMuleContextFactory muleContextFactory = new DefaultMuleContextFactory();
    SpringXmlConfigurationBuilder configBuilder = new SpringXmlConfigurationBuilder(args.length == 0 ? "main.xml" : args[0]);
    MuleContext muleContext = muleContextFactory.createMuleContext(configBuilder);
    muleContext.start();
  }

  private static void setProperty(String propertyName, String[] expectedValues, String defaultValue)
  {
    String value = System.getProperty(propertyName);
View Full Code Here

            }
            MuleContextFactory factory = new DefaultMuleContextFactory();

            builder = new SpringXmlConfigurationBuilder(new ConfigResource[] {config, defaultConfigOverride});
            muleContext = factory.createMuleContext(builder);
            muleContext.start();

            MuleArtifact artifact = null;
            if (embedInFlow)
            {
                Pipeline pipeline = muleContext.getRegistry().lookupObject(flowName);
View Full Code Here

            public boolean isPrimaryPollingInstance()
            {
                return false;
            }
        });
        context.start();
        assertThat(context.isPrimaryPollingInstance(), is(false));
    }

    @Test
    public void getStreamCloserService() throws Exception
View Full Code Here

                {
                    contextStartedLatch.get().countDown();
                }
            }
        });
        muleContext.start();
        contextStartedLatch.get().await(20, TimeUnit.SECONDS);
    }

}
View Full Code Here

    public void testStartupOrder() throws Exception
    {
        MuleContext muleContext = new DefaultMuleContextFactory().createMuleContext(new QueueManagerOnlyConfigurationBuilder());
        FlowConstruct fc = new RecordingFlow("dummy", muleContext);
        muleContext.getRegistry().registerFlowConstruct(fc);
        muleContext.start();
        muleContext.stop();
        assertEquals(4, startStopOrder.size());
        assertSame(rtqm, startStopOrder.get(0));
        assertSame(fc, startStopOrder.get(1));
        assertSame(fc, startStopOrder.get(2));
View Full Code Here

                "org/mule/test/spring/mule-root-test.xml");
        MuleContextFactory muleContextFactory = new DefaultMuleContextFactory();
        MuleContext context = muleContextFactory.createMuleContext(builder);
        // MuleContext must be started explicitly after MULE-1988
        assertFalse(context.isStarted());
        context.start();
        assertTrue(context.isStarted());

        final EndpointBuilder endpoint = context.getRegistry().lookupEndpointBuilder("endpoint");
        assertNotNull(endpoint);
        assertEquals("test://value", endpoint.buildInboundEndpoint().getEndpointURI().toString());
View Full Code Here

        }
        builders.add(getAppBuilder(this.applicationResources));
        DefaultMuleContextBuilder contextBuilder = new DefaultMuleContextBuilder();
        configureMuleContext(contextBuilder);
        context = muleContextFactory.createMuleContext(builders, contextBuilder);
        context.start();
        return context;
    }

    protected ConfigurationBuilder getAppBuilder(String[] configResource) throws Exception
    {
View Full Code Here

        builders.add(cfgBuilder);
        DefaultMuleContextFactory muleContextFactory = new DefaultMuleContextFactory();
        MuleContext domainContext = muleContextFactory.createMuleContext(builders, new DefaultMuleContextBuilder());
        if (!disableMuleContextStart)
        {
            domainContext.start();
        }
        return domainContext;
    }

    protected ConfigurationBuilder getDomainBuilder(String configResource) throws Exception
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.