Package javax.batch.operations

Examples of javax.batch.operations.BatchRuntimeException


            } catch (Throwable e) {
                LOGGER.failToRunJob(e, jobContext.getJobName(), step.getId(), step);
                if (e instanceof Exception) {
                    batchContext.setException((Exception) e);
                } else {
                    batchContext.setException(new BatchRuntimeException(e));
                }
                batchContext.setBatchStatus(BatchStatus.FAILED);
            }

            jobContext.destroyArtifact(mapper, reducer, analyzer);
View Full Code Here


        if(collectPartitionData != null) {
          partitionQueue.add(collectPartitionData);
        }
      }
    } catch (Throwable e) {
      throw new BatchRuntimeException("An error occured while collecting data from the PartionCollector", e);
    } finally {
      if(lock.isHeldByCurrentThread()) {
        lock.unlock();
      }
    }
View Full Code Here

        if(collectPartitionData != null) {
          partitionQueue.add(collectPartitionData);
        }
      }
    } catch (Throwable e) {
      throw new BatchRuntimeException("An error occured while collecting data from the PartionCollector", e);
    } finally {
      if(lock.isHeldByCurrentThread()) {
        lock.unlock();
      }
    }
View Full Code Here

  @Override
  public void beforeJob(JobExecution jobExecution) {
    try {
      delegate.beforeJob();
    } catch (Exception e) {
      throw new BatchRuntimeException(e);
    }
  }
View Full Code Here

  @Override
  public void afterJob(JobExecution jobExecution) {
    try {
      delegate.afterJob();
    } catch (Exception e) {
      throw new BatchRuntimeException(e);
    }
  }
View Full Code Here

        delegate.onError((Exception) context.getAttribute(ChunkListener.ROLLBACK_EXCEPTION_KEY));
      } catch (Exception e) {
        throw new UncheckedTransactionException(e);
      }
    } else {
      throw new BatchRuntimeException("Unable to retrieve causing exception due to null ChunkContext");
    }
  }
View Full Code Here

  public void onSkipInRead(Throwable t) {
    if(skipReadDelegate != null && t instanceof Exception) {
      try {
        skipReadDelegate.onSkipReadItem((Exception) t);
      } catch (Exception e) {
        throw new BatchRuntimeException(e);
      }
    }
  }
View Full Code Here

         * assuming this SkipListenerAdapter will only be called from JsrFaultTolerantChunkProcessor,
         * which calls onSkipInWrite() with the whole chunk (List) of items instead of single item
         */
        skipWriteDelegate.onSkipWriteItem((List<Object>) item, (Exception) t);
      } catch (Exception e) {
        throw new BatchRuntimeException(e);
      }
    }
  }
View Full Code Here

  @Override
  public void stop() {
    try {
      batchlet.stop();
    } catch (Exception e) {
      throw new BatchRuntimeException(e);
    }
  }
View Full Code Here

  public void onSkipInProcess(T item, Throwable t) {
    if(skipProcessDelegate != null && t instanceof Exception) {
      try {
        skipProcessDelegate.onSkipProcessItem(item, (Exception) t);
      } catch (Exception e) {
        throw new BatchRuntimeException(e);
      }
    }
  }
View Full Code Here

TOP

Related Classes of javax.batch.operations.BatchRuntimeException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.