View Javadoc

1   /***
2    * 
3    */
4   package hu.elte.tribus.action;
5   
6   import org.hibernate.Session;
7   import org.hibernate.SessionFactory;
8   import org.springframework.web.struts.ActionSupport;
9   
10  /***
11   * @author kocka
12   * 
13   * @deprecated Should use ActionSupport instead
14   */
15  public abstract class SessionSupport extends ActionSupport {
16  	protected Session getSession(){
17  		SessionFactory sessionFactory = (SessionFactory) this.getWebApplicationContext().getBean("hibernateSessionFactory");
18  		return sessionFactory.getCurrentSession();
19  	}
20  }