very new to spring. couple of questions.
1) am using simplejdbccall to call a stored procedure. if something goes wrong, does it throw a SQLException ? basically have done the following:
public void runProc (int arg1, int arg2, int arg3)
String myProc = "myprocedure";
SimpleJdbcCall procToExecute = new SimpleJdbcCall(getDataSource())
SqlParameterSource params = new MapSqlParameterSource()
Is this the correct way ? Since it is a procedure and nothing is returned, how do I get the SQLCode and error text information if something goes wrong ? I know spring automatically throw exceptions, but do I just need to catch SQLException. I tried to put the above in a try/catch block, but it said SQLException was not valid.
2) The other thing is on our normal Dao objects that use simpleJdbcTemplate to interact with our oracle database, we usually log error information on errors returned. how do I generically extract sqlcode and error information from not only stored procedures/functions, but also just normal jdbctemplate sql calls like getSimpleJdbcTemplate().query calls.
Any help or examples would be very much appreciated.