Specifying the Objects to Bootstrap

To load an object into the Mule registry using the bootstrap mechanism, you specify the object in the properties file registry-bootstrap.properties, which you then store in the META-INF directory for the transport or module. For example:

Each entry in the registry-bootstrap.properties file is a simple key/value pair that defines the object:

registry-bootstrap.properties

1

myobject=org.foo.MyObject

If this file is in a module or transport’s META-INF directory, Mule will register an instance of org.foo.MyObject with a key of 'myobject' into the local registry when that module or transport is loaded.

If you want to ensure that the object gets a unique ID in the local registry, you can use object.n for the key, where n is a sequential number:

registry-bootstrap.properties

1
2

object.1=org.foo.MyObject
object.2=org.bar.MyObject

Adding Transformers

When adding transformers, you can also define the returnClass and name of the transformer as parameters:

Note that the key used for transformers must be transformer.n where n is a sequential number.

If the transformer name is not specified, Mule will automatically generate the name as JMSMessageToXXX where XXX is the return class name, such as JMSMessageToString. If no returnClass is specified, the default value in the transformer will be used.

In this topic:

Sign up for our Dev newsletter

MuleSoft provides the most widely used integration platform for connecting SaaS and enterprise applications in the cloud and on-premises. Delivered as a packaged integration experience, CloudHub™ and Mule ESB™ (Enterprise Service Bus) are built on proven open source technology for the fastest, most reliable on-premises and cloud integration without vendor lock-in.