The connection pool has nothing to do with Hibernate. To configure Hibernate's SessionFactory you need a DataSource. The DataSource itself can (internally) pool connections, such as the one I proposed. Hibernate will benefit from connection pooling, if it's available, but it will not know about it.
If you use an application server, you can also obtain a preconfigured DataSource from JNDI which uses the application server's connection pool.
Here is an example for a DBCP datasource configuration. I hope it helps:
Code:
<bean id="DataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
<property name="driverClassName">
<value>${jdbc.driverClassName}</value>
</property>
<property name="url">
<value>${jdbc.url}</value>
</property>
<property name="username">
<value>${jdbc.username}</value>
</property>
<property name="password">
<value>${jdbc.password}</value>
</property>
<property name="poolPreparedStatements">
<value>true</value>
</property>
<property name="initialSize">
<value>1</value>
</property>
<property name="maxActive">
<value>5</value>
</property>
<property name="maxIdle">
<value>2</value>
</property>
</bean>
Regards,
Andreas