Would it be so bad to just add a fetchSize attribute to <statement />? In .NET land I added a preserveWhitespace attribute to <statement /> to make it easier to copy and paste the executing sql into another program and handle -- style comments better. I've gotten requests from my team at work to also add a commandTimeout property to <statement />. That's probably going to happen too.
Perhaps Raga should be encouraged to write a patch, submit it to JIRA, then if no one has major objections it can be added instead of encouraging him to make an internal fork. ________________________________ From: Jeff Butler <jeffgbut...@gmail.com> To: dev@ibatis.apache.org Sent: Friday, July 3, 2009 10:40:05 AM Subject: Re: How to set Prefetch size on the resultSet level in IBATIS If you feel you need this, then you could easily hack iBATIS to set the fetch size on a result set. Add these lines to the beginning of the handleResults method in com.ibatis.sqlmap.engine.execution.DefaultSqlExecuter: Integer fetchSize = statementScope.getStatement().getFetchSize(); if (fetchSize != null) { rs.setFetchSize(fetchSize.intValue()); } Before you ask, I'll state that we will probably not add this to the official iBATIS2 code base. But this is the true beauty of open source - you can modify the code to make it work the way you need it to work! Jeff Butler On Fri, Jul 3, 2009 at 9:20 AM, Raghavendran Chellappa <raghavendr...@virtusa.com> wrote: Jeff, >Many thanks for your reply. > >We are using iBATIS 2.3.0. > >fetchSize set on StoredProcedure gets set >on the CallableStatement. But unfortunately does not get percolate to the >ResultSet when the application is running on Weblogic server. >A point to note is that we are running our >application in the same JVM as the weblogic server. > >Thanks, >Raga > > > >Raghavendran Chellappa, 'Tel: +91 44 42002700 >Ext: 3257 Mobile: >+91-98407 87523 > ________________________________ > >From:Jeff Butler >[mailto:jeffgbut...@gmail.com] >Sent: Friday, July 03, 2009 7:38 >PM >To: dev@ibatis.apache.org >Subject: Re: How to set Prefetch >size on the resultSet level in IBATIS > >What version of iBATIS are you using? With versions 2.2.0 and >later, iBATIS will set the fetchSize on stored procedure calls - and that >should translate to the result set (according to the JDBC spec). > >iBATIS does not support setting the fetchSize directly on a result set. > >Jeff Butler > >On Thu, Jul 2, 2009 at 11:28 PM, Raghavendran Chellappa ><raghavendr...@virtusa.com> >wrote: >Hi, > >>We are having issues with the "prefetchSize" property that is >available at the "procedure" element (of ibatis sqlmap). Even though >we set the prefetch size to a value, say 100, ibatis ignores this and always >defaults to 10 (jdbc driver default). Also our application is a weblogic based >J2EE >app running in the same JVM as the weblogic server. Hence the prefetchSize set >on the callableStatement will not work. >>But prefetchSize set on the resultSet level will work perfectly(after getting >the resultSet from the callableStatementt). > >>Hence, in IBatis we need to set the prefetchSize at the resultSet level while >executing a storedproc. >>We dont seem to find a way to do this in ibatis at the moment. > >>Is this a limitation/bug or is there a way around this? > >>Any help here will be much appreciated. > >>thanks, >>Raga > > >--------------------------------------------------------------------------------------------- > >This message, including any attachments, contains confidential information >intended for a specific individual and purpose, and is intended for the >addressee only. Any unauthorized disclosure, use, dissemination, copying, or >distribution of this message or any of its attachments or the information >contained in this e-mail, or the taking of any action based on it, is strictly >prohibited. If you are not the intended recipient, please notify the sender >immediately by return e-mail and delete this message. > >--------------------------------------------------------------------------------------------- > > >--------------------------------------------------------------------------------------------- > >This message, including any attachments, contains confidential information >intended for a specific individual and purpose, and is intended for the >addressee only. Any unauthorized disclosure, use, dissemination, copying, or >distribution of this message or any of its attachments or the information >contained in this e-mail, or the taking of any action based on it, is strictly >prohibited. If you are not the intended recipient, please notify the sender >immediately by return e-mail and delete this message. > >--------------------------------------------------------------------------------------------- >