Contact Us 1-800-596-4880

Global Configurations

Global configurations for a mule application such as the default transaction timeout or default error handler can be configured in the <configuration> element of the root level of the Mule Configuration File.

Create a Global Configuration from Studio

To create a global configuration:

  1. In Studio, select the Global Elements tab and click Create:

    create-global-settings
  2. Select Global Configurations > Configuration:

    configure-global-settings

  3. Configure the Default Error Handler and the HA Profile values.

Create a Global Configuration by Editing the XML

The following example defines a global error handler, and then a global configuration that specifies a default transaction timeout and references the global error handler as the default:

<mule>
  ...
  <!-- Error handler -->
  <error-handler name="GlobalErrorHandler"/>
  <!-- Global Settings -->
  <configuration doc:name="GlobalSettings" defaultTransactionTimeout="31337" defaultErrorHandler-ref="GlobalErrorHandler" />
  ...
  </configuration>
  ...
</mule>

Global Configurations Reference

The following table shows all attributes of the <configuration> element:

Name Type Required Default Description

defaultResponseTimeout

string

no

10000

The default period (ms) to wait for a synchronous response.

defaultTransactionTimeout

string

no

30000

The default timeout (ms) for transactions. This can also be configured on transactions, in which case the transaction configuration is used instead of this default.

defaultErrorHandler-ref

string

no

none

The default error handler for every flow. This must be a reference to a global error handler.

shutdownTimeout

integer

no

5000

(As of Mule 2.2.2) The time in milliseconds to wait for any in-progress messages to finish processing before Mule shuts down. After this threshold has been reached, Mule starts interrupting threads, and messages can be lost. If you have a very large number of services in the same Mule instance, if you have components that take more than a couple seconds to process, or if you are using large payloads and/or slower transports, you should increase this value to allow more time for graceful shutdown. The value you specify is applied to services and separately to dispatchers, so the default value of 5000 milliseconds specifies that Mule has ten seconds to process and dispatch messages gracefully after shutdown is initiated.

maxQueueTransactionFilesSize

integer

no

500

The approximated maximum space in megabytes used by the transaction log files for transactional persistent queues. Take into account that this number applies both to the set of transaction log files for XA and for local transactions. If both type of transactions are used then the approximated maximum space used will be twice the configured value.

defaultObjectSerializer-ref

string

no

none

An optional reference to an ObjectSerializer to be used as the application’s default.

Child Elements of <configuration>

Name Description

dynamic-config-expiration

Optional. The default expiration settings for dynamic configurations, used by connectors. This can also be configured on connectors, in which case the connector configuration is used instead of this default.
For configuration details, see: Dynamic Configuration Expiration.

cluster-config

Optional. Mule application cluster configuration.
For configuration details, see: Clustering for High Performance.