boolean autoStart = trans == null;
try {
trans = autoStartTransaction(sessionScope, autoStart, trans);
StatementScope statementScope = beginStatementScope(sessionScope, ms);
try {
ms.executeQueryWithRowHandler(statementScope, trans, paramObject, rowHandler);
} finally {
endStatementScope(statementScope);
}