Return-Path: Delivered-To: apmail-ibatis-dev-archive@www.apache.org Received: (qmail 46456 invoked from network); 14 Jan 2008 18:46:00 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 14 Jan 2008 18:46:00 -0000 Received: (qmail 88288 invoked by uid 500); 14 Jan 2008 18:45:49 -0000 Delivered-To: apmail-ibatis-dev-archive@ibatis.apache.org Received: (qmail 88272 invoked by uid 500); 14 Jan 2008 18:45:49 -0000 Mailing-List: contact dev-help@ibatis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ibatis.apache.org Delivered-To: mailing list dev@ibatis.apache.org Received: (qmail 88261 invoked by uid 99); 14 Jan 2008 18:45:49 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 14 Jan 2008 10:45:49 -0800 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 14 Jan 2008 18:45:42 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 441DD71425F for ; Mon, 14 Jan 2008 10:45:34 -0800 (PST) Message-ID: <2812708.1200336334276.JavaMail.jira@brutus> Date: Mon, 14 Jan 2008 10:45:34 -0800 (PST) From: "Clinton Begin (JIRA)" To: dev@ibatis.apache.org Subject: [jira] Closed: (IBATIS-439) Batching of statements does not work for stored procedures In-Reply-To: <11150065.1182164606115.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/IBATIS-439?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Clinton Begin closed IBATIS-439. -------------------------------- Resolution: Fixed > Batching of statements does not work for stored procedures > ---------------------------------------------------------- > > Key: IBATIS-439 > URL: https://issues.apache.org/jira/browse/IBATIS-439 > Project: iBatis for Java > Issue Type: Bug > Components: SQL Maps > Affects Versions: 2.3.0 > Environment: All relational databases > Reporter: Trevor Brosnan > Fix For: 2.3.1 > > > iBatis SQLMaps incorporates a mechanism for utilizing the JDBC API's underlying batching capabilities (Statement.addBatch()) to efficiently group a set of database operations together for maximum performance. This mechanism works as expected for dynamic SQL, but does not work for callable statements. > This behavior has been deduced using P6Spy (configured to log to a Log4j SocketAppender) in conjunction with the SQL Profiler tool. As a note - NOT all JDBC Drivers support batching of callable statements. Older DB2 type 4 drivers did not support batching of callable statements. However, most modern drivers do (e.g. Sybase jConnect, Oracle JDBC Driver etc) > The fix for this issue is straightforward. Change the method definition for sqlExecuteUpdate in class com.ibatis.sqlmap.engine.mapping.statement.ProcedureStatement to be as follows: > protected int sqlExecuteUpdate(RequestScope request, Connection conn, String sqlString, Object[] parameters) throws SQLException { > > if (request.getSession().isInBatch()) { > getSqlExecutor().addBatch(request, conn, sqlString, > parameters); > return 0; > } else { > return getSqlExecutor().executeUpdateProcedure(request, conn, > sqlString.trim(), parameters); > } > } -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.