Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 3rd, 2012  |  syntax: None  |  size: 0.30 KB  |  hits: 15  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. junit test case for a method with hibernate fetch
  2. public List<User> userList() {      
  3.     try
  4.     {      
  5.           List <User> result =  hibernateTemplate.find("from User");        
  6.           return result;
  7.     }
  8.     finally {
  9.         //close the session and user-supplied JDBC connection
  10.     }
  11. }