@Override public Void call() throws Exception { jobListener.onJobStart(jobContext); return null; } });
@Override public void apply(JobListener jobListener, JobContext jobContext) throws Exception { jobListener.onJobStart(jobContext); } });
@Override public void onJobStart(JobContext jobContext) throws Exception { StringBuffer buf = new StringBuffer(); for (JobListener listener: listeners) { try { listener.onJobStart(jobContext); } catch (Exception e) { buf.append(listener.getClass().getName() + ":" + e.toString()); log.error(ExceptionUtils.getFullStackTrace(e)); } } String exceptions = buf.toString(); if (!exceptions.isEmpty()) { throw new RuntimeException(exceptions); } }
@Override public void apply(JobListener jobListener, JobContext jobContext) throws Exception { jobListener.onJobStart(jobContext); } });
@Override public Void call() throws Exception { jobListener.onJobStart(jobContext); return null; } });
@Override public void onJobStart(JobContext jobContext) throws Exception { StringBuffer buf = new StringBuffer(); for (JobListener listener: listeners) { try { listener.onJobStart(jobContext); } catch (Exception e) { buf.append(listener.getClass().getName() + ":" + e.toString()); log.error(ExceptionUtils.getFullStackTrace(e)); } } String exceptions = buf.toString(); if (!exceptions.isEmpty()) { throw new RuntimeException(exceptions); } }