java - Using Prepared Statements and Connection Pooling together in MySQL -
Currently, for each query, a prepared statement is created and reused. I am not using any connection pool C3P0 is a widely recommended library.
But, connected to a connection as a ready place. In the accumulated environment, the connections come back to the pool, making the site designed effectively vain. Am I right about this conclusion? What is the method to use ready statement and connection pooling?
Update: This is the only application, so, I just can not use a framework to get connection pooling.
It depends on the pooling mechanism. Most Java EE applications have connection pool implementation where there is a ready cash cache with each connection in the pool. Then the prepared statement is re-connections as well as connections. I do not provide information about any standalone pooling mechanism, although information about this functionality is available.
Comments
Post a Comment