[ 
http://nagoya.apache.org/jira/browse/IBATIS-22?page=comments#action_57114 ]
     
Juergen Hoeller commented on IBATIS-22:
---------------------------------------

FYI, we support something similar in Spring: transaction timeouts that get 
applied as query timeout for each SQL statement executed within a transaction 
(each statement with the remaining timeout in the transaction, of course).

A timeout value can be specified in a Spring transaction attribute, applied to 
any operations performed with that particular transaction. The framework does 
its best to interpret the timeout for the concrete transaction and data access 
strategy.

We currently support this for Spring's JDBC framework (automatically calling 
Statement.setQueryTimeout), for Hibernate (automatically calling 
Query/Criteria.setTimeout), and for JDO (via our JdoDialect strategy, beyond 
the JDO standard).

If we get an appropriate hook in the SqlMapClient API (for example a setTimeout 
method on the SqlMapSession interface, which propagates the timeout to JDBC 
Statements), we'll add such support for iBATIS too.

As a side note: The same effect can be achieved by wrapping the JDBC driver, 
automatically applying remaining timeouts to all created Statements. However, 
it would still be nice to have explicit support for timeouts in higher-level 
persistence APIs.

Juergen

> Specify Query Timeout
> ---------------------
>
>          Key: IBATIS-22
>          URL: http://nagoya.apache.org/jira/browse/IBATIS-22
>      Project: iBatis for Java
>         Type: New Feature
>   Components: SQL Maps
>     Reporter: Rahul Kapoor

>
> There seems to be no current way to specify timeouts for select statements. I 
> did see a message in the sf forum that using driver properties is a possible 
> workaround. But it would be really nice to have a per statement timeout.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://nagoya.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira

Reply via email to