»Ë»Ñ Æ÷·³
°³¹ßÀÚÆ÷·³ ÀÔ´Ï´Ù.
  • ºÏ¸¶Å© ¾ÆÀÌÄÜ

SPRING + IBATIS Insert ¼Óµµ ÀúÇÏ °ü·Ã Áú¹®9

  • ÃóÃò´Ï
  • µî·ÏÀÏ 2015-03-21 09:32
  • Á¶È¸¼ö 3180
¾È³çÇϼ¼¿ä ,

ÀúÈñ´Â Spring + Ibatis ¸¦ ÀÌ¿ëÇÏ¿© À¥À» ±¸¼ºÇÏ¿´´Âµ¥,
Insert ¼Óµµ°¡ ³Ê¹«³Ê¹« ´À¸®³×¿ä ..¤Ð
5õ Row Test ¸¦ ÇÏ¿´´Âµ¥ ù 1000 Row Insert Çϴµ¥ 1ºÐ, ´ÙÀ½ 1000 Row Insert Çϴµ¥ 3ºÐ, ±×´ÙÀ½ 1000 Row 6 ºÐ,
ÀÌ·±½ÄÀ¸·Î °è¼ÓÀûÀ¸·Î ´À·ÁÁö³×¿ä..
ºü¸£°Ô ÇÒ ¹æ¹ýÀÌ ÀÖÀ»±î¿ä ??

°í¼öºÐµé µµ¿ò ºÎŹµå¸³´Ï´Ù

-----------Transaction Manager
<tx:advice id="txAdvice" transaction-manager="transactionManager">
                <tx:attributes>
                        <tx:method name="select*" read-only="true" />
                        <tx:method name="save*" rollback-for="Exception" propagation="REQUIRED" />
                        <tx:method name="update*" rollback-for="Exception" propagation="REQUIRED" />
                        <tx:method name="delete*" rollback-for="Exception" propagation="REQUIRED" />
                </tx:attributes>
        </tx:advice>

-----------Action
public String saveTestInsert() throws Exception {
                ActionContext ctx = ActionContext.getContext();
                HttpServletRequest request = (HttpServletRequest) ctx.get(ServletActionContext.HTTP_REQUEST);
                HttpServletResponse response = ServletActionContext.getResponse();

                Gson gson = new Gson();                
                sysmCommService.saveTestInsert(vo);
                ResponseJson.response(request, response, SUCCESS, getText("MESG.NOTS.0006"));
                
                return null;
        }
-----------ServiceImpl
@Override
        public void saveTestInsert(CompanyVO vo) throws Exception {
                        int addr1 = 0;
                        for (int i = 0; i < 5000 ; i++) {
                                vo.setAddr1(String.valueOf(i+1));
                                sysmCommDAO.saveTestInsert(vo);
                                System.out.println("------------ i : " + i);
                        }
                
                }
        }
-----------DAO
        public void sav1TestInsert(CompanyVO vo) throws Exception {
                getSqlMapClientTemplate().insert("sysmcomm.saveTestInsert", vo);
        }

0
ÃßõÇϱ⠴ٸ¥ÀÇ°ß 0
|
°øÀ¯¹öÆ°

´Ù¸¥ÀÇ°ß 0 Ãßõ 0 [* ºñȸ¿ø *]

´Ù¸¥ÀÇ°ß 0 Ãßõ 0 ÃóÃò´Ï

´Ù¸¥ÀÇ°ß 0 Ãßõ 0 [* ºñȸ¿ø *]

´Ù¸¥ÀÇ°ß 0 Ãßõ 0 ÃóÃò´Ï

´Ù¸¥ÀÇ°ß 0 Ãßõ 0 ´ÞÆØ´ÞÆØ

´Ù¸¥ÀÇ°ß 0 Ãßõ 0 ´ë³ª¹«½£

´Ù¸¥ÀÇ°ß 0 Ãßõ 0 ´ÞÆØ´ÞÆØ

´Ù¸¥ÀÇ°ß 0 Ãßõ 0 ¾Æ½ê»ËÀ¯½ê»Ñ»Ë!

´Ù¸¥ÀÇ°ß 0 Ãßõ 0 ven2s
  • ¾Ë¸² ¿å¼³, »óó ÁÙ ¼ö ÀÖ´Â ¾ÇÇÃÀº »ï°¡ÁÖ¼¼¿ä.
©¹æ »çÁø  
¡â ÀÌÀü±Û¡ä ´ÙÀ½±Û ¸ñ·Ïº¸±â