* {@inheritDoc}
*/
public MuleContext buildMuleContext()
{
logger.debug("Building new DefaultMuleContext instance with MuleContextBuilder: " + this);
DefaultMuleContext muleContext = createDefaultMuleContext();
muleContext.setMuleConfiguration(injectMuleContextIfRequired(getMuleConfiguration(), muleContext));
muleContext.setWorkManager(injectMuleContextIfRequired(getWorkManager(), muleContext));
muleContext.setworkListener(getWorkListener());
muleContext.setNotificationManager(injectMuleContextIfRequired(getNotificationManager(), muleContext));
muleContext.setLifecycleManager(injectMuleContextIfRequired(getLifecycleManager(), muleContext));
muleContext.setExpressionManager(injectMuleContextIfRequired(new DefaultExpressionManager(),muleContext));
DefaultRegistryBroker registryBroker = new DefaultRegistryBroker(muleContext);
muleContext.setRegistryBroker(registryBroker);
muleContext.setMuleRegistry(new MuleRegistryHelper(registryBroker, muleContext));
muleContext.setLocalMuleClient(new DefaultLocalMuleClient(muleContext));
muleContext.setExceptionListener(new DefaultSystemExceptionStrategy(muleContext));
muleContext.setExecutionClassLoader(Thread.currentThread().getContextClassLoader());
return muleContext;
}