2013年9月16日星期一

Multithreading c3p0 connection pool problem

You parents , brother novice Moren know how to use connection pooling c3p0
I think is to get an online source connection, and then through this connection to create a stmt, finished using the connection is closed and stmt it.
this does not feel right ah.
case of repetition to create multi-threaded and close connection it would be a waste of resources and time ?
solving .
------ Solution ---------------------------------------- ----
it is returned to the connection pool connection
------ For reference only ----------------------- ----------------

close the connection is returned to the thread pool ?
------ For reference only ------ ---------------------------------
 is a drop
------ For reference only ----------- ----------------------------
 is the connection pool
------ For reference only --------------- ------------------------

Well, that use multiple threads , then, is multiplexed connection instead of a stmt ?
------ For reference only -------------------------------------- -
connection pool Well, do not do is to provide the connection .
------ For reference only -------------------------------------- -

Well, I think that is a direct close connection closed up

没有评论:

发表评论