Modify code so that access to muleContext is always synchronized.