0

In stand alone application which is build on top of hibernate I like to use Tomcat JDBC Connection Pool.

My guess is that i need to add some configs in hibernate.cfg.xml.

Can someone guide me how to configure hibernate to use "Tomcat JDBC Connection Pool" as connection pool.

Aram Arabyan
  • 2,339
  • 1
  • 17
  • 30
  • May be this will help you [Config](http://www.javacodegeeks.com/2012/06/using-tomcat-jdbc-connection-pool-in.html) – Imran Jun 12 '15 at 11:45

1 Answers1

2

In your hibernate.cfg.xml configuration file, you need to set the following property:

hibernate.connection.datasource=java:/comp/env/jdbc/TestDB

assuming this is the JNDI name of your Tomcat CP DataSource.

Vlad Mihalcea
  • 142,745
  • 71
  • 566
  • 911