public void performAction(Exchange exchange) throws Exception { //Skipping some lines here... if (routeId.equals(exchange.getFromRouteId())) { // Run the controlling in a separate thread in order for the current // flow to finish final String finalRouteId = routeId; context.getExecutorServiceManager().newSingleThreadExecutor(this, "RouteControllerSelf").execute(new Runnable() { @Override public void run() { try { performAction(finalRouteId, action, context); } catch (Exception e) { // Cannot do much with this exception except log it logger.warn("Exception thrown while attempting to " + action + " route " + finalRouteId + " asynchronously.", e); } } }); } else { performAction(routeId, action, context); } }