try {
if (_count != 1)
throw new IllegalStateException("Multithreading execute");
xa = _conn.getTransaction();
QueryContext queryContext = getQueryContext();
if (_query.isSelect()) {
_query.execute(queryContext, xa);
_wasResultSet = true;
_resultSet = new ResultSetImpl(this, queryContext.getResult());
return true;
}
else {
queryContext.setReturnGeneratedKeys(_isReturnGeneratedKeys);
_query.execute(queryContext, xa);
_wasResultSet = false;
return false;