Friday, May 9, 2008

Spring Framework problem : SqlReturnResultSet() not returned

One more problem with servicemix and spring is in DAO classes, when you make any private static class of StoreProcedure, then in its constructor you must declare SqlReturnResultSet before you declare SqlParameter.Otherwise you will not be able to find return data from StoredProcedure execution.Check the code below,
public MySp(JdbcTemplate jdbcTemplate){
declareParameter(new SqlReturnResultSet("strRs",rsMyResultSet));
declareParameter(new SqlReturnResultSet("strRs1",rsMyResultSet1));
declareParameter(new SqlParameter("myId", Types.INTEGER));
so keep in mind while using Spring DAO support.Must declare resultsets first.