|
From: Rod J. <rod...@in...> - 2003-07-05 15:15:01
|
Exception handling in the batchUpdate() method is as for all JdbcTemplate methods. If SQLException is encountered from JDBC, the exception is translated into our exception hierarchy with DataAccessException as root. These exceptions are all unchecked. So if you regard the exception as fatal (usually the case for data access exceptions) don't write a catch block and leave it to propagate to the web container. If you want to handle it, catch anything you think might be recoverable. DataAccessException or a subclass such as BadSqlGrammarException. Regards, Rod ----- Original Message ----- From: "JP Pawlak" <jp....@ti...> To: <spr...@li...> Sent: Saturday, July 05, 2003 3:58 PM Subject: [Springframework-developer] BatchPreparedStatementSetter > Hi Rod, Juergen, > > Planning to use the BatchPreparedStatementSetter in the Countries Demo, > I have a doubt on exception handling. > The source involved is > com.interface21.samples.countries.dao.AbstractCountryDaoJdbc. > As the method setValues(.) doesn't declare SQLException, what is the > safest way for Exception handling inside this method? > > Regards, > Jean-Pierre > > > > > > ------------------------------------------------------- > This SF.Net email sponsored by: Free pre-built ASP.NET sites including > Data Reports, E-commerce, Portals, and Forums are available now. > Download today and enter to win an XBOX or Visual Studio .NET. > http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_061203_01/01 > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer |