Background:
C3P0 Connection Pool
Jdbc.maxpoolsize=1
Jdbc.minpoolsize=1
Jdbc.initialpoolsize=1
Connection conn = Datasource.getconnection ()
After the Close method is executed, the connection is really closed instead of being put back in the connection pool.
I found a lot of people on the Internet. After using the connection pool, connection's Close method is not really closed, just put it back in the pool for use.
I always like to go to the bottom, in fact, Curiosity killed the cat. So I couldn't help but test it.
First time:
[Email protected] [Wrapping: [email protected]]
Second time:
[Email protected] [Wrapping: [email protected]]
The above statement should be correct.
[Email protected] is the same object, that is, the same connection.
C3P0 connection do the Close method actually destroy the connection object after the connection pool is obtained?