Nav
You are viewing an older version of this section. Click here to navigate to the latest version.

Injecting Mule Managers

This feature is only available since 3.0.3

The DevKit can inject several Mule managers into your module. This mechanism is implemented via the use of the standard injection annotation @Inject.

For example, if you wish to access Mule’s expression manager you can do so as follows:


       
    
1
2
@Inject
private ExpressionManager expressionManager;

Remember that every field that needs injection must have a public setter method. Also the injection mechanism currently only works on fields. Method parameters annotated with @Inject will be ignored.

The following is a list of the available objects for injection:

  • MuleContext

  • TransactionManager

  • SeverNotificationManager

  • QueueManager

  • MuleConfiguration

  • LifecycleManager

  • ClassLoader

  • ExpressionManager

  • EndpointFactory

  • MuleClient

  • SystemExceptionHandler

  • SecurityManager

  • ObjectStoreManager

  • WorkManager

  • Registry