Created
January 27, 2012 20:19
-
-
Save marianogonzalez/1690712 to your computer and use it in GitHub Desktop.
create child context
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// reference the files with the customized flows and resources | |
ConfigResource[2] resources = new ConfigResource[2]; | |
resources[0] = new ConfigResource(new URL(pathToCustomFile1)); | |
resources[1] = new ConfigResource(new URL(pathToCustomFile2)); | |
// create a spring configuration builder | |
SpringXmlConfigurationBuilder springXmlConfigurationBuilder = new SpringXmlConfigurationBuilder(resources); | |
//reference the parent | |
springXmlConfigurationBuilder.setParentContext(parentMuleContext); | |
//create the child context | |
MuleContextFactory muleContextFactory = new DefaultMuleContextFactory(); | |
List<ConfigurationBuilder> builders = new ArrayList<ConfigurationBuilder>(); | |
builders.add(springXmlConfigurationBuilder); | |
MuleContextBuilder contextBuilder = new DefaultMuleContextBuilder(); | |
MuleContext childContext = muleContextFactory.createMuleContext(builders, contextBuilder); | |
//start the context | |
childContext.start(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment