List of usage examples for javax.resource.spi.work WorkCompletedException setErrorCode
public void setErrorCode(String errorCode)
From source file:org.mule.work.MuleWorkManager.java
/** * Execute the specified Work.// w ww . ja v a2 s . com * * @param work Work to be executed. * @exception WorkException Indicates that the Work execution has been * unsuccessful. */ private void executeWork(WorkerContext work, WorkExecutor workExecutor) throws WorkException { if (!isStarted()) { throw new IllegalStateException("This MuleWorkManager '" + name + "' is stopped"); } try { work.workAccepted(this); workExecutor.doExecute(work, workExecutorService); WorkException exception = work.getWorkException(); if (null != exception) { throw exception; } } catch (InterruptedException e) { WorkCompletedException wcj = new WorkCompletedException( "The execution has been interrupted for WorkManager: " + name, e); wcj.setErrorCode(WorkException.INTERNAL); throw wcj; } }