I am still newbish to java development as I am mainly a C# developer. I'd开发者_JS百科 like to know how to use or enable connection pooling when I do SQL requests from my Java servlet.
In C# using the MySql connector, it's super simple as it is only a parameter or two to add in the connection string:
Pooling=true; Connection Lifetime=1200;
But how does that work in Java? Is it enabled by default?
I am using the "com.mysql.jdbc.Driver" driver.
Thanks!
Use a connection pool such as c3p0 or Apache Commons DBCP
精彩评论