if (executeMethodSet.contains(method))
{
List<Lock> locks = this.getProxyFactory().extractLocks((String) parameters[0]);
return this.getProxyFactory().getTransactionContext().start(new LockingInvocationStrategy(InvocationStrategies.TRANSACTION_INVOKE_ON_ALL, locks), this.getProxyFactory().getParentProxy());
}
if (method.equals(executeQueryMethod))
{
String sql = (String) parameters[0];
List<Lock> locks = this.getProxyFactory().extractLocks(sql);
int concurrency = statement.getResultSetConcurrency();
boolean selectForUpdate = this.getProxyFactory().isSelectForUpdate(sql);
if (locks.isEmpty() && (concurrency == ResultSet.CONCUR_READ_ONLY) && !selectForUpdate)
{
boolean repeatableReadSelect = (statement.getConnection().getTransactionIsolation() >= Connection.TRANSACTION_REPEATABLE_READ);
return repeatableReadSelect ? InvocationStrategies.INVOKE_ON_PRIMARY : InvocationStrategies.INVOKE_ON_NEXT;
}
InvocationStrategy strategy = InvocationStrategies.TRANSACTION_INVOKE_ON_ALL;
if (!locks.isEmpty())
{
strategy = new LockingInvocationStrategy(strategy, locks);
}
return selectForUpdate ? this.getProxyFactory().getTransactionContext().start(strategy, this.getProxyFactory().getParentProxy()) : strategy;
}
if (method.equals(executeBatchMethod))
{
return this.getProxyFactory().getTransactionContext().start(new LockingInvocationStrategy(InvocationStrategies.TRANSACTION_INVOKE_ON_ALL, this.getProxyFactory().getBatchLocks()), this.getProxyFactory().getParentProxy());
}
if (method.equals(getMoreResultsMethod))
{
if (parameters[0].equals(Statement.KEEP_CURRENT_RESULT))