Uploaded image for project: 'JBeret'
  1. JBeret
  2. JBERET-138

Make JdbcItemWriter work with local transaction

XMLWordPrintable

    • Icon: Feature Request Feature Request
    • Resolution: Done
    • Icon: Minor Minor
    • 1.1.0.Final
    • 1.1.0.Beta1
    • jberet-support
    • None

      In local transaction environment (e.g. SE or EE with jberet.local-tx), application developer should manage transaction by themself but currently JdbcItemWriter seems that doesn't implemented such procedure yet. currently it may run using auto commit mode on such environment.

      I have an example project at https://github.com/lbtc-xxx/jberet-support-test . it reads item from SRC table then write them to DEST table. it always fails on 2nd chunk due to attempt to insert duplicate key. chunk writing should be atomic but it went wrong as follows. it should be 10 rows.

      ij> select * from app.dest;
      DATA       
      -----------
      100        
      200        
      300        
      400        
      500        
      600        
      700        
      800        
      900        
      1000       
      1100       
      1200       
      1300       
      1400       
      1500       
      
      15 rows selected
      

            cfang@redhat.com Cheng Fang
            xkylex Kohei Nozaki (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: