c3p0 seems to attribute configuration

c3p0 private property configuration:

The number of connections created during initialization, the value should be between minPoolSize and maxPoolSize. The default is 3

initialPoolSize=20

Then the pool to retain the maximum number of connections. The default is 15

maxPoolSize=30
minPoolSize=20

When the number of connection pool runs out, C3P0 one-time connection to create a new default 3

acquireIncrement=10

After obtaining the number of times defined in the new database connection failure from repeated attempts to get the default is 30

acquireRetryAttempts=100

Two connection interval, in milliseconds, the default is 1000

acquireRetryDelay=1000

By default all actions to roll back uncommitted when the connection is closed. The default is false

autoCommitOnClose=false

Obtaining a connection failure will cause all threads waiting to acquire connected thrown. But the data source is still valid reservation, and the next

Call to getConnection () time to continue to try to obtain a connection. If true, then the attempt to get connected

After the failure of the data source has been disconnected and permanently closed stated. The default is false

breakAfterAcquireFailure=false

When connecting the battery runs out after the client calls getConnection () waiting to acquire new connection time, overtime will be thrown

SQLException, such as 0 to wait indefinitely. In milliseconds, default 0

checkoutTimeout=20000

The maximum idle time, idle time is exceeded the connection will be dropped. It is 0 or a negative value never discarded. The default is 0

maxIdleTime=60

Check all the free connection pool connection every 60 seconds. Default: 0

idleConnectionTestPeriod=60

C3P0 is an asynchronous operation, slow JDBC operations by helping to complete the process. These operations can be extended effectively improve performance

Implement multiple operations simultaneously by multiple threads to be executed. The default is 3

numHelperThreads=3

Up to the user to modify the system configuration the number of seconds to wait before execution parameters. The default is 300

propertyCycle = 300
maxStatements = 0


When connecting the battery runs out after the client calls getConnection () waiting to acquire new connection time, overtime will be thrown

SQLException, such as 0 to wait indefinitely. In milliseconds, default 0

checkoutTimeout=20000

Time setting is too small there will be a connection timeout. This will throw an exception, be careful when setting the time. Set the appropriate value in accordance with the actual situation

https://www.cnblogs.com/LvLoveYuForever/p/5935732.html

Reproduced in: https: //www.cnblogs.com/magicya/p/11057509.html

Guess you like

Origin blog.csdn.net/weixin_34216107/article/details/93661823