have this method call -> simpleJdbcTemplate.queryForInt(sql,null); -> queryForInt() method in the springs SimpleJdbcTemplate throws a DataAccessException which is a runtime exception. i want to propegate exceptions to the view tier of the application since Spring frame work Wraps Checked Exceptions inside RuntimeExceptions i stuck here
how do i do this?
Explanation 1:
The value-add provided by the Spring Framework's JDBC abstraction framework- they say The Spring Framework takes care of all except 3 and 6. 3 and 6 need to be coded by an application developer
- Define connection parameters
- Open the connection
- Specify the statement
- Prepare and execute the statement
- Set up the loop to iterate through the results (if any)
- Do the work for each iteration
- Process any exception
- Handle transactions
- Close the connection
but if the exceptions not handled in the developer level if i encounter a situatoin like this: the connection to the database losses after certain time the program started. then a runtime exception will be thrown when a call to the above method made.since i dont handle the exception i cannot inform the user interface(view)
how do i solve this?