Providing Connections for Hibernate
Hibernate, being an Object->Relational DB Mapper for Java, needs access to JDBC connections. Out of the box, Hibernate is fairly self contained when it comes to connection control. By default, Hibernate ships with the ability to obtain a data source implementation ( javax.sql.DataSource ) from JNDI by setting the properties appropriately. You can find different kind of Hibernate connection pool libraries here hibernate.connection.datasource = java:/comp/env/jdbc/test Alternatively, if JNDI isn't an option, you can use a Hibernate-internal connection pool implementation (C3PO), and simply give driver/url information for Hibernate to create and pool its own connections: hibernate.connection.driver_class = org.postgresql.Driver hibernate.connection.url = jdbc: postgresql://localhost/test hibernate.connection.username = root hibernate.connection.password = password12 hibernate.c3p0.min_size=5 hi...