Batch Update

When "CONNECTED_BATCH" is specified as the Executor type of DBIO, DBIO calls addBatch of the Statement for each record during data processing such as insert, update, and delete, and calls executeBatch for batch processing when a section commit occurs. This usage provides appropriate processing performance for a batch application execution environment that processes large volumes of data.

  • DBIO Executor type (same as Batch Fetch)

DBIO Executor - CONNECTED_BATCH(Insert/Update/Delete)
Figure 1. DBIO Executor - CONNECTED_BATCH(Insert/Update/Delete)
  • Using DBIO in ItemWriter

@BxmBean("MMdpCustMng03")
@BxmCategory(logicalName = "Sample customer processing batch module 03")
public class MMdpCustMng03 implements ItemWriter<MMdpCustMng03Dto> {
    final Logger logger = LoggerFactory.getLogger(this.getClass());

    @Autowired
    private DTblEduCustomer001 dTblEduCustomer001;

    @Override
    public void write(List<? extends MMdpCustMng03Dto> input) throws Exception {

        List<DEduCustomer001Insert01InDto> customers = new ArrayList<DEduCustomer001Insert01InDto>();

        for(MMdpCustMng03OutDto mMdpCustMng01OutDto : input)
        {
            DEduCustomer001Insert01InDto customer = new DEduCustomer001Insert01InDto();

            customer.setCustId(mMdpCustMng01OutDto.getCustId());// set [Customer ID]

            customers.add(customer);
        }

        dTblEduCustomer001.inser01(customers); // (1)
    }

(1) The "CONNECTED_BATCH" Executor DBIO can receive data as a List, and the received data is processed when the query is executed at commit time. When using "Batch Update", the query is executed at commit time, so no error occurs at the point when DBIO is called.

SWLab Bankware Global
  • 전체
  • BXM
  • BXCM
  • BXCP
  • BXI
제품 선택 시 더 정확한 매뉴얼 가이드를 제공해드립니다.

Copyright© Bankwareglobal All Rights Reserved.