On 8/19/06, Jeff Butler <[EMAIL PROTECTED]> wrote:
I agree - make this reason #645 that the ODBC bridge driver should NEVER be used.I think that calling the method only if something is configured is more consistent with the spirit of iBATIS where we don't do something that wasn't asked for. I can't imagine what I was thinking when I wrote it! If you configure this, and the driver doesn't support it, you'll find out when you run your first test.Jeff Butler
On 8/19/06, Larry Meadors <[EMAIL PROTECTED] > wrote:I am not crazy about that approach..I guess it's not too big of a
deal, but I think I would prefer a global setting in SqlMapConfig.xml
to make it easier to turn on/off.
Quietly ignoring exceptions sucks as bad as having an API that only
tells you if a feature is supported by throwing them. It's lame that
the driver does this, IMO.
Larry
On 8/19/06, Sanjiv Jivan <[EMAIL PROTECTED]> wrote:
>
> Okay, I'll check it out. The fix should work for me, but I think in general
> even if the user has set a query timeout and the driver doesn't support it,
> it should log a warning and not error out. This is how Hibernate handles
> this condition.
>
>
> Thanks,
> Sanjiv
>
>
> On 8/19/06, Jeff Butler <[EMAIL PROTECTED]> wrote:
> >
> >
> > No schedule. But the fix is now checked into SVN (I just deleted the call
> to setQueryTimeout(0)). You could easily check out the source and build it
> yourself today. The build script just requires that JAVA_HOME is set.
> >
> >
> > Jeff Butler
> >
> >
> > On 8/19/06, Sanjiv Jivan < [EMAIL PROTECTED] > wrote:
> > >
> > >
> > > Thanks. Is there a patch release schedule?
> > >
> > >
> > >
> > > On 8/19/06, Jeff Butler < [EMAIL PROTECTED] > wrote:
> > > >
> > > >
> > > > 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 < [EMAIL PROTECTED] > 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 < [EMAIL PROTECTED] > 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 < [EMAIL PROTECTED] > 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 < [EMAIL PROTECTED] > 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
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>
