0

From my searching, I found many people and tutorials use apache dbcp in Spring even in Spring tutorial. But found some comments said Tomcat has released new JDBC connection pool to replace the older that has performance problem.

Does Tomcat JDBC connection pool works great, especially performance?

I have used apache dbcp in Spring but never use Tomcat JDBC connection pool. How to configure Tomcat's in Spring?

Thank you.

  • Typically you would configure Tomcat's datasource in JNDI, and then look this up using Spring's `` config. Is this what you're asking? – Will Keeling Jan 31 '14 at 11:09
  • Thank you Will for your advise. I'll try to do it. Does anyone ever use BoneCP on Tomcat? From my searching I found this is the new JDBC connection pool. – user3253661 Feb 01 '14 at 13:20
  • Have a look at this answer that describes how to set up a JNDI BoneCP datasource in Tomcat. http://stackoverflow.com/questions/19386905/loading-bean-property-values-from-context-xml Also worth checking the other answer which uses Spring config rather than JNDI which is simpler and gives you the option to override environment specific config. – Will Keeling Feb 01 '14 at 13:34
  • Thank you so much Will. Just visited and read already. This helps me a lot. – user3253661 Feb 01 '14 at 15:57

1 Answers1

0

From my perspective, HikariCP is the best for connection pooling. That’s why Spring autoconfigure chooses HikariCP by default.

Thanh Tran
  • 21
  • 1
  • 4