Beginner |
|
Joined: Wed Feb 25, 2004 10:58 am Posts: 43
|
If I am using spring/AOP with hibernate and am not using template callbacks, what is the proper way to catch JDBCException since HibernateTemplate etc will use SQLExceptionTranslator-based handling)
catch(JDBCException e) {
?
} catch(HibernateException e){
throw SessionFactoryUtils.convertHibernateAccessException(e);
}
}
convertHibernateAccessException will throw it as HibernateJdbcException .
I would like to use convertJdbcAccessException so I can uses SQLExceptionTranslator-based handling but I am not sure what object to call this off . I could uses the hibernateAccessor class but it says that it should not be used directly.
Thanks
|
|