Java MySQL connetion pool is not working

后端 未结 4 1031
猫巷女王i
猫巷女王i 2021-01-26 03:46

I\'ve written a function in Java that runs a MySQL query and returns results. I\'ve implemented connection pooling using this method here: http://www.kodejava.org/how-do-i-creat

4条回答
  •  太阳男子
    2021-01-26 04:22

    Your can pre-load your pool by calling connectionPool.addObject(). At the start it is empty and creates a connection only after you've posted a query.

提交回复
热议问题