Servlet « Connection « JPA Q&A





1. Database connection via Hibernate in servlets    stackoverflow.com

What is the best place in servlet for Hibernate code that returns HibernateSessionFactory ? I saw many examples: ones put db connection in service methods. Others - use smth like HibernateUtil (Singleton) ...

2. How to configure DB connection in a Servlet based JPA application    stackoverflow.com

By default DB connections of JPA applications are configured in the META-INF/persistence.xml, when the application is not deployed to a full Java EE application server. In my opinion it is not ...

3. JNDI datasource config "strange servlet 2.3" messa    forum.hibernate.org

Hi, I am getting a strange error when I try and configure my hibernate impl to us a type 4 datasource. I am trying to plug into WebSphere commerce server which has its own pecularities. Anyway any help welcomed. Do I need a type 5 data source type? Thanks in advance. Ben Hibernate version: 3.5 config documents: jdbc/WebSphere Commerce DB2 ...