Package org.mule.context

Examples of org.mule.context.DefaultMuleContextFactory$ContextConfigurator


      AutoConfigurationBuilder configbuilder = new AutoConfigurationBuilder("conf/jallinone.xml");
      DefaultMuleConfiguration muleConfig = new DefaultMuleConfiguration();
      muleConfig.setClientMode(true);
      DefaultMuleContextBuilder contextBuilder = new DefaultMuleContextBuilder();
      contextBuilder.setMuleConfiguration(muleConfig);
      muleContext = new DefaultMuleContextFactory().createMuleContext(configbuilder, contextBuilder);
     
     
     
/*
      if (createMuleContext) {
View Full Code Here


    public MuleContext createMule(String resources) throws Exception
    {
        defineLogOutput(resources);

        MuleContext context;
        org.mule.api.context.MuleContextFactory muleContextFactory = new DefaultMuleContextFactory();

        List<ConfigurationBuilder> builders = new ArrayList<ConfigurationBuilder>();
        builders.add(new SimpleConfigurationBuilder(properties()));
        if (ClassUtils.isClassOnPath(CLASSNAME_ANNOTATIONS_CONFIG_BUILDER,
                                     getClass()))
        {
            builders.add((ConfigurationBuilder) ClassUtils.instanciateClass(
                    CLASSNAME_ANNOTATIONS_CONFIG_BUILDER, ClassUtils.NO_ARGS,
                    getClass()));
        }
        builders.add(getBuilder(resources));
        MuleContextBuilder contextBuilder = new DefaultMuleContextBuilder();
        configureMuleContext(contextBuilder);
        context = muleContextFactory
                .createMuleContext(builders, contextBuilder);
        ((DefaultMuleConfiguration) context.getConfiguration())
                .setShutdownTimeout(0);

        context.getNotificationManager().setNotificationDynamic(true);
View Full Code Here

        }
    }

    protected void parseConfig() throws Exception
    {
        new DefaultMuleContextFactory().createMuleContext(getBuilder());
    }
View Full Code Here

        muleContext = null;

        try
        {
            SpringXmlConfigurationBuilder builder = new SpringXmlConfigurationBuilder("clientbridge/conf/client-mule-config.xml");
            MuleContextFactory muleContextFactory = new DefaultMuleContextFactory();
            muleContext = muleContextFactory.createMuleContext(builder);

            Client c = new Client();
            c.execute();
        }
        finally
View Full Code Here

    /**
     * Test that an existing appContext can be added to Mule's internal Registries
     */
    public void testSpringConfigurationBuilder() throws Exception
    {
        MuleContext context = new DefaultMuleContextFactory().createMuleContext();
       
        ApplicationContext appContext = new ClassPathXmlApplicationContext("application-context.xml");
        ConfigurationBuilder builder = new SpringConfigurationBuilder(appContext);
        builder.configure(context);

View Full Code Here

    /**
     * Test that the same bean from the 2nd appContext will have precedence over the 1st appContext
     */
    public void testSpringConfigurationBuilderPrecedence() throws Exception
    {
        MuleContext context = new DefaultMuleContextFactory().createMuleContext();
       
        ApplicationContext appContext = new ClassPathXmlApplicationContext("application-context.xml");
        ConfigurationBuilder builder = new SpringConfigurationBuilder(appContext);
        builder.configure(context);

View Full Code Here

        assertEquals("Tropicana", ((Orange) orange).getBrand());
    }

    public void testSpringConfigurationBuilderBackwardsPrecedence() throws Exception
    {
        MuleContext context = new DefaultMuleContextFactory().createMuleContext();
       
        ApplicationContext appContext = new ClassPathXmlApplicationContext("application-context-2.xml");
        ConfigurationBuilder builder = new SpringConfigurationBuilder(appContext);
        builder.configure(context);
View Full Code Here

    /**
     * Test that the same bean from the TransientRegistry will have precedence over the 1st appContext
     */
    public void testTransientRegistryPrecedence() throws Exception
    {
        MuleContext context = new DefaultMuleContextFactory().createMuleContext();
       
        context.getRegistry().registerObject("orange", new Orange(12, 5.5, "Tutti Frutti"));
       
        ApplicationContext appContext = new ClassPathXmlApplicationContext("application-context.xml");
        ConfigurationBuilder builder = new SpringConfigurationBuilder(appContext);
View Full Code Here

    /**
     * Test that an existing appContext can be used as a parent AppContext for Mule
     */
    public void testParentContext() throws Exception
    {
        MuleContext context = new DefaultMuleContextFactory().createMuleContext();

        ApplicationContext appContext = new ClassPathXmlApplicationContext("application-context.xml");

        SpringXmlConfigurationBuilder builder = new SpringXmlConfigurationBuilder("mule-config.xml");
        builder.setParentContext(appContext);
View Full Code Here

    /**
     * Test the most common approach: Create the Spring config + Mule config in a single AppContext.
     */
    public void testAppContextTogetherWithMuleConfig() throws Exception
    {
        MuleContext context = new DefaultMuleContextFactory().createMuleContext();

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

        context.start();
View Full Code Here

TOP

Related Classes of org.mule.context.DefaultMuleContextFactory$ContextConfigurator

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.