开发者

How to enable JDBC/MySqlConnectorj connection pooling?

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜