메뉴 건너띄기
상단메뉴 바로가기
본문 바로가기

이 누리집은 대한민국 공식 전자정부 누리집입니다.

본문 영역

적용 지원, FAQ, Q&A 게시판을 통해 기술 문제 해결을 지원합니다.

묻고 답하기

Batch SQL 처리 방법
  • 작성자

    김*수

  • 작성일

    2013-06-24 18:26:15

  • 조회수

    1,832

  • 구분

    실행환경

  • 진행상태

    완료

질문

EgovAbstractDAO에서 Batch SQL 처리방법을 알고 싶습니다.
감사합니다.

답변

안녕하세요. 김기수님.

iBatis에서 배치를 호출하는 것처럼 SqlMapClientCallback를 활용하시면 됩니다.

ex:

getSqlMapClientTemplate().execute(new SqlMapClientCallback() {
public Object doInSqlMapClient(SqlMapExecutor executor) throws SQLException {
executor.startBatch();
executor.update("insertSomething", "myParamValue");
executor.update("insertSomethingElse", "myOtherParamValue");
executor.executeBatch();
return null;
}
});

그럼, 즐거운 하루되십시오.
감사합니다.

이 페이지의 구성

묻고 답하기