Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 13632 invoked from network); 19 Aug 2006 16:29:24 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 19 Aug 2006 16:29:24 -0000 Received: (qmail 96360 invoked by uid 500); 19 Aug 2006 16:29:23 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 95823 invoked by uid 500); 19 Aug 2006 16:29:22 -0000 Mailing-List: contact user-java-help@ibatis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user-java@ibatis.apache.org Delivered-To: mailing list user-java@ibatis.apache.org Received: (qmail 95810 invoked by uid 99); 19 Aug 2006 16:29:22 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 19 Aug 2006 09:29:22 -0700 X-ASF-Spam-Status: No, hits=0.5 required=10.0 tests=DNS_FROM_RFC_ABUSE,HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of jeffgbutler@gmail.com designates 66.249.92.168 as permitted sender) Received: from [66.249.92.168] (HELO ug-out-1314.google.com) (66.249.92.168) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 19 Aug 2006 09:29:21 -0700 Received: by ug-out-1314.google.com with SMTP id m2so1235487ugc for ; Sat, 19 Aug 2006 09:29:00 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=ttn0bv8yoBAbk/R/s7hnQbOSZhLn0PGDKev2ayE0hK44aLPZjXOoSlHbPNShjZU9BfDfrMTJbF/vDRwvUR1skkaR9EsxV0G9rBZZ7XLJMbPOdz6A2jAwxkVURfTJvS8rpLTbk8Xrb7JR4mD6hEFbFf7KMkz1pdCWb1EAAwm1EoA= Received: by 10.67.29.12 with SMTP id g12mr2451673ugj; Sat, 19 Aug 2006 09:29:00 -0700 (PDT) Received: by 10.66.221.15 with HTTP; Sat, 19 Aug 2006 09:29:00 -0700 (PDT) Message-ID: Date: Sat, 19 Aug 2006 11:29:00 -0500 From: "Jeff Butler" To: user-java@ibatis.apache.org Subject: Re: MSAccess support? In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_20207_11880655.1156004940138" References: X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N ------=_Part_20207_11880655.1156004940138 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Well I think it was a bad call on my part to call the setQueryTimeout if you don't specify one. I'll fix it. Jeff Butler On 8/19/06, Sanjiv Jivan wrote: > > Yes, a SQLException is raised. Maybe at startup time try calling the > method and set a boolean flag or lazily set the boolean flag at the first > time a call to setQueryTimeout() is made. > > Thanks, > Sanjiv > > > On 8/19/06, Jeff Butler wrote: > > > > Does an SQLExcpetion get thrown, or some other error? I've done a > > quick check, but so far can't find any standard call to check for driver > > compliance. I'll keep looking - but maybe an all encompassing catch block > > will be the way to handle it. > > > > Jeff Butler > > > > > > On 8/19/06, Sanjiv Jivan wrote: > > > > > > > > > It appears that the query timeout feature was added only in Ibatis > > > 2.2.0 which seems to have broken the MSAcess support. > > > http://www.nabble.com/query-timeout--tf1868564.html#a5106526 > > > > > > http://issues.apache.org/jira/browse/IBATIS-22 > > > > > > Can Ibatis test driver support for this feature before calling it? > > > Additionally, in com.ibatis.sqlmap.engine.execution.SqlExecutor, > > > can the method setStatementTimeout not explicitly call > > > statement.setQueryTimeout(0) if mappedStatement.getTimeout() is null. > > > > > > private static void setStatementTimeout(MappedStatement > > > mappedStatement, Statement statement) throws SQLException { > > > if (mappedStatement.getTimeout() != null) { > > > statement.setQueryTimeout(mappedStatement.getTimeout().intValue()); > > > } else { > > > statement.setQueryTimeout(0); // no timeout > > > } > > > } > > > > > > Thanks, > > > Sanjiv > > > > > > On 8/18/06, Sanjiv Jivan wrote: > > > > > > > > The Ibatis FAQ entry on list of supported database/driver lists > > > > MSAccess 2000 with the Sun JDBC OBDC bridge. However when trying to use > > > > Ibatis 2.20 / JDK 1.4 with MSAccess 2000, an exception with message > > > > "Optional feature not implemented"is raised at the point where Ibatis calls > > > > statement.setQueryTimeout(). I checked out the Ibatis code and there > > > > is no protection around this call to test if the optional feature is > > > > supported. > > > > > > > > So my question is how are people able to run Ibatis with MSAccess > > > > using the Sun jdbc-odbc driver? Is it the case that JDK 1.5 has > > > > implemented this method? Regardless, we are required to support JDK > > > > 1.4 so would it be possible for Ibatis to support JDK 1.4 / MS > > > > Access? > > > > > > > > Thanks, > > > > Sanjiv > > > > > > > > > > > > > > > > > > > > > ------=_Part_20207_11880655.1156004940138 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline
Well I think it was a bad call on my part to call the setQueryTimeout if you don't specify one.  I'll fix it.
 
Jeff Butler

 
On 8/19/06, Sanjiv Jivan <sanjiv.jivan@gmail.com> wrote:
Yes, a SQLException is raised. Maybe at startup time try calling the method and set a boolean flag or lazily set the boolean flag at the first time a call to setQueryTimeout() is made.
 
Thanks,
Sanjiv

 
On 8/19/06, Jeff Butler <jeffgbutler@gmail.com > wrote:
Does an SQLExcpetion get thrown, or some other error?  I've done a quick check, but so far can't find any standard call to check for driver compliance.  I'll keep looking - but maybe an all encompassing catch block will be the way to handle it.
 
Jeff Butler

 
On 8/19/06, Sanjiv Jivan <sanjiv.jivan@gmail.com > wrote:

It appears that the query timeout feature was added only in Ibatis 2.2.0 which seems to have broken the MSAcess support.
 
Can Ibatis test driver support for this feature before calling it?  Additionally, in com.ibatis.sqlmap.engine.execution.SqlExecutor,
can the method setStatementTimeout not explicitly call statement.setQueryTimeout(0) if  mappedStatement.getTimeout() is null.
 
  private static void setStatementTimeout(MappedStatement mappedStatement, Statement statement) throws SQLException {
    if (mappedStatement.getTimeout() != null) {
      statement.setQueryTimeout(mappedStatement.getTimeout ().intValue());
    } else {
      statement.setQueryTimeout(0); // no timeout
    }
  }
 
Thanks,
Sanjiv
 
On 8/18/06, Sanjiv Jivan <sanjiv.jivan@gmail.com > wrote:
The Ibatis FAQ entry on list of supported database/driver lists MSAccess 2000 with the Sun JDBC OBDC bridge. However when trying to use Ibatis 2.20 / JDK 1.4 with MSAccess 2000, an exception with message "Optional feature not implemented"is raised at the point where Ibatis calls statement.setQueryTimeout(). I checked out the Ibatis code and there is no protection around this call to test if the optional feature is supported.
 
So my question is how are people able to run Ibatis with MSAccess using the Sun jdbc-odbc driver? Is it the case that JDK 1.5 has implemented this method? Regardless, we are required to support JDK 1.4 so would it be possible for Ibatis to support JDK 1.4 / MS Access?
 
Thanks,
Sanjiv
 
 




------=_Part_20207_11880655.1156004940138--