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

Injecting Mule Managers into Anypoint Connectors

+

DevKit can inject several Mule managers into your module via the standard injection annotation @Inject.

For example, to access Mule’s expression manager:


       
    
1
2
@Inject
private ExpressionManager expressionManager;

Remember:

  • Every field requiring injection must have a public setter method. 

  • 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