Hi all I\'m using Hibernate+Struts2+Tomcat6+Mysql as my J2EE framework. I\'ve been using hibernate\'s built-in connection pooling mechanism but it turned out to be problemat
Apparently, you did it right. But here is a list of things you'll need with examples from a working application:
1) A context.xml file in META-INF, specifying your data source:
2) web.xml which tells the container that you are using this resource:
jdbc/DsWebAppDB
javax.sql.DataSource
3) Hibernate configuration which consumes the data source. In this case, it's a persistence.xml
, but it's similar in hibernate.cfg.xml
org.hibernate.ejb.HibernatePersistence