SHARE
TWEET

Untitled

a guest Jul 14th, 2011 319 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. @Repository
  2. public class TestServiceDAOImpl implements TestServiceDAO{
  3.        
  4.     private SessionFactory sessionFactory;
  5.        
  6.         public String getResponse(){
  7.                 Session session = sessionFactory.getCurrentSession();
  8.                 session.beginTransaction();
  9.              
  10.                 Query query = session.createQuery("dummy query");
  11.                 String response = query.uniqueResult();
  12.  
  13.                 session.close();
  14.  
  15.             return query;
  16.         }
  17.  
  18.         public SessionFactory getSessionFactory() {
  19.                 return sessionFactory;
  20.         }
  21.  
  22.         public void setSessionFactory(SessionFactory sessionFactory) {
  23.                 this.sessionFactory = sessionFactory;
  24.         }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top