/** * Inform the component that a message has arrived. * @param message The message that arrived. */ public void messageArrived(IMessageAdapter message) { getComponent().getComponentFeature(IExecutionFeature.class) .scheduleStep(createHandleMessageStep(message)) .addResultListener(new IResultListener<Void>() { public void resultAvailable(Void result) { // NOP } public void exceptionOccurred(Exception exception) { if(!(exception instanceof ComponentTerminatedException) || !((ComponentTerminatedException)exception).getComponentIdentifier().equals(component.getComponentIdentifier())) { // Todo: fail fast components? StringWriter sw = new StringWriter(); exception.printStackTrace(new PrintWriter(sw)); getComponent().getLogger().severe("Exception during message processing\n"+sw); } } }); }