SessionFactory « Struts « JPA Q&A





1. storing Hibernate SessionFactory with Struts    stackoverflow.com

I'm getting started using Hibernate with Struts 2 for a relatively simply web project. For performance reasons, I know it is recommended to minimize the times you create the Hibernate ...

2. [S2] Where to put hibernate's SessionFactory?    struts.1045723.n5.nabble.com

I am making my first web app and I found out today I was doing something wrong: I was building a SessionFactory on my HibernateEntityManager: _sessionFactory = configuration.buildSessionFactory(); This EntityManager is called on the action so, basically, I was creating a SessionFactory on each request. Searching the web, I panicked! Most people talk about using Spring in addition to Struts2 + ...

3. proper place for SessionFactory in struts/web application    forum.hibernate.org

I'm reading through the eBook, and I have a struts application that uses hibernate that I'm developing. I have things working....so I'm not asking about a bug. I'm wondering though, where is the proper place for the SessionFactory. Currently I have

Service.java classes for each of my database tables. They have the basic add/update/query methods. Each method, I create a SessionFactory....do ...