INT-3265 Stored Proc Debug Logging

Set up stored procedure name in `SimpleJdbcCall` before setting
up row mappers; previously the debug logg showed `[null]` for
the procedure name.

JIRA: https://jira.springsource.org/browse/INT-3265
This commit is contained in:
Gary Russell
2014-01-16 15:43:27 -05:00
parent c45b708341
commit e6a2534fd2

View File

@@ -232,6 +232,13 @@ public class StoredProcExecutor implements BeanFactoryAware, InitializingBean {
final SimpleJdbcCall simpleJdbcCall = new SimpleJdbcCall(this.dataSource);
if (this.isFunction) {
simpleJdbcCall.withFunctionName(storedProcedureName);
}
else {
simpleJdbcCall.withProcedureName(storedProcedureName);
}
if (this.ignoreColumnMetaData) {
simpleJdbcCall.withoutProcedureColumnMetaDataAccess();
}
@@ -250,13 +257,6 @@ public class StoredProcExecutor implements BeanFactoryAware, InitializingBean {
simpleJdbcCall.withReturnValue();
}
if (this.isFunction) {
simpleJdbcCall.withFunctionName(storedProcedureName);
}
else {
simpleJdbcCall.withProcedureName(storedProcedureName);
}
simpleJdbcCall.getJdbcTemplate().setSkipUndeclaredResults(this.skipUndeclaredResults);
return simpleJdbcCall;