public Object process(Object object) { if (object instanceof ManagementContextAware) { if (context == null) { context = MuleServer.getManagementContext(); if (context == null) { // todo throw new NullPointerException("manContext is null"); } } ((ManagementContextAware) object).setManagementContext(context); } return object; }