// if this is a locking select and the lock timeout is greater than
// the configured query timeout, use the lock timeout
if (forUpdate && _dict.supportsQueryTimeout && fetch != null
&& fetch.getLockTimeout() > stmnt.getQueryTimeout() * 1000) {
int timeout = fetch.getLockTimeout();
Log log = _conf.getLog(JDBCConfiguration.LOG_JDBC);
if (timeout < 1000) {
timeout = 1000;
if (log.isWarnEnabled())
log.warn(_loc.get("millis-query-timeout"));
}
try {
stmnt.setQueryTimeout(fetch.getLockTimeout() / 1000);
}
catch(SQLException e) {
if(_dict.ignoreSQLExceptionOnSetQueryTimeout) {
if (log.isTraceEnabled()) {
log.trace(_loc.get("error-setting-query-timeout",
new Integer(timeout), e.getMessage()), e);
}
}
else {
throw e;