Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Tomcat Configuration -- Use Connection Pool To Access MySQL Database

 
JiaPei Jen
Ranch Hand
Posts: 1309
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I was reading the instructions to use connection pool to access MySql database on Tomcat 4.1.18. The instructions are at the web link below:
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-howto.html
I am confused and need help:
There is this sentence in the instruction: "To configure a DBCP DataSource so that abandoned dB connections are removed and recycled, add the following paramater to the ResourceParams configuration for your DBCP DataSource Resource....."
Question: I know how to add ResourceParams. But ... where do I configure DBCP DataSource Resrouce? In the server.xml? Which section in the server.xml should I add the parameters?
 
Mike Curwen
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just keep reading in that same document.

under "MySQL DBCP Example", point 2 "server.xml configuration"

You'd add your parameter in with all the others that are shown here.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic