Examples of AlwaysSkipItemSkipPolicy


Examples of org.springframework.batch.core.step.skip.AlwaysSkipItemSkipPolicy

  @Test
  public void testWriteRetryOnTwoExceptions() throws Exception {
    SimpleRetryPolicy retryPolicy = new SimpleRetryPolicy();
    retryPolicy.setMaxAttempts(2);
    batchRetryTemplate.setRetryPolicy(retryPolicy);
    processor.setWriteSkipPolicy(new AlwaysSkipItemSkipPolicy());
    processor.setItemWriter(new ItemWriter<String>() {
      @Override
      public void write(List<? extends String> items) throws Exception {
        if (items.contains("fail")) {
          throw new IllegalArgumentException("Expected Exception!");
View Full Code Here

Examples of org.springframework.batch.core.step.skip.AlwaysSkipItemSkipPolicy

  @Test
  // BATCH-2036
  public void testProcessFilterAndSkippableException() throws Exception {
    final List<String> processedItems = new ArrayList<String>();
    processor.setProcessorTransactional(false);
    processor.setProcessSkipPolicy(new AlwaysSkipItemSkipPolicy());
    processor.setItemProcessor(new ItemProcessor<String, String>() {
      @Override
      public String process(String item) throws Exception {
        processedItems.add(item);
        if (item.contains("fail")) {
View Full Code Here

Examples of org.springframework.batch.core.step.skip.AlwaysSkipItemSkipPolicy

  @Test
  // BATCH-2036
  public void testProcessFilterAndSkippableExceptionNoRollback() throws Exception {
    final List<String> processedItems = new ArrayList<String>();
    processor.setProcessorTransactional(false);
    processor.setProcessSkipPolicy(new AlwaysSkipItemSkipPolicy());
    processor.setItemProcessor(new ItemProcessor<String, String>() {
      @Override
      public String process(String item) throws Exception {
        processedItems.add(item);
        if (item.contains("fail")) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.