Beginner |
|
Joined: Tue Jun 21, 2005 2:21 am Posts: 22
|
HI
i'm currently working for an Application with uses Spring and Hibernate . Also we are following layered architecture .
in this my business logic resides in a ServiceImpl which interacts with a repository where it holds a intelligence for fetching and storing persistence data .
i'm using HibernateDAOSupport for all my repositories . so i need to know how to handle exception for the following scenarion say :
public person findByPersonUId(Long personUid) {
List list = null;
String query = "";
list = (Person ) getHibernateTemplate().findByNamedParam(...")
if(list!= null) {
return person ;
}
in this case even though if there is a problem ,a null value is returned . Is there any need for catching any exception out here if so what exception in need to catch .
currently i'm follwoing this
catch(Exception e) {
log.wrtie(""");
|
|