Access Keys:
Skip to content (Access Key - 0)
Cancel    
Cancel   
 

About Configuration Builders

Jul 23, 2013 11:53

Janet Revell

Jul 23, 2013 12:23

Mulesoft Mule 3.4.X Documentation

About Configuration Builders

Mulesoft Documentation Page

Contents

About Configuration Builders

The configuration builder is responsible for creating the configuration that's used at run time from the configuration files you provide. Mule ESB provides two standard configuration builders, or you can create your own.

SpringXmlConfigurationBuilder

The default configuration builder used to configure Mule is the SpringXmlConfigurationBuilder. This configuration builder uses Spring to configure Mule based on one or more XML files leveraging custom Mule namespaces. For more information, see About the XML Configuration File.

ScriptConfigurationBuilder

This configuration builder allows a JSR-223 compliant script engine such as Groovy or Jython to configure Mule. For more information, see Scripting Module Reference.

Custom Configuration Builders

You can easily create your own custom configuration builder by implementing the

ConfigurationBuilder

interface, which has a method configure. Typically, you call configure(MuleContext muleContext.getRegistry()) to get access to Mule's internal registry, which contains the configuration information, and to register objects and other elements.

In most cases, you will want to inherit from the class

AbstractResourceConfigurationBuilder

, which will make any configuration files specified on the command line available in an instance variable called configResources.

Specifying the Configuration Builder

AutoConfigurationBuilder is the default configuration builder. If you want to use another configuration builder, you can specify it in the deployment descriptor of an application.

You can also specify the configuration builder as a parameter to the MuleContextFactory when starting Mule programatically: