Skip to content

Commit e092b49

Browse files
committed
update configuration for new properties in PooledDataSource
1 parent 9804467 commit e092b49

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

src/site/xdoc/configuration.xml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1947,6 +1947,14 @@ SqlSessionFactory factory = new SqlSessionFactoryBuilder().build(reader, propert
19471947
Default:
19481948
20000ms (i.e. 20 seconds)
19491949
</li>
1950+
<li><code>poolMaximumLocalBadConnectionTolerance</code> – This is a low level setting about
1951+
tolerance of bad connections got for any thread. If a thread got a bad connection, it may
1952+
still have another chance to re-attempt to get another connection which is valid. But the
1953+
retrying times should not more than the sum of <code>poolMaximumIdleConnections</code>
1954+
and <code>poolMaximumLocalBadConnectionTolerance</code>.
1955+
Default:
1956+
3
1957+
</li>
19501958
<li><code>poolPingQuery</code> – The Ping Query is sent to the database to
19511959
validate that a connection is in good working order and is ready
19521960
to

src/site/zh/xdoc/configuration.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1639,6 +1639,11 @@ SqlSessionFactory factory = new SqlSessionFactoryBuilder().build(reader,properti
16391639
</li>
16401640
<li><code>poolTimeToWait</code> – 这是一个底层设置,如果获取连接花费的相当长的时间,它会给连接池打印状态日志并重新尝试获取一个连接(避免在误配置的情况下一直安静的失败),默认值:20000 毫秒(即 20 秒)。
16411641
</li>
1642+
<li><code>poolMaximumLocalBadConnectionTolerance</code> – 这是一个关于坏连接容忍度的底层设置,
1643+
作用于每一个尝试从缓存池获取连接的线程. 如果这个线程获取到的是一个坏的连接,那么这个数据源允许这
1644+
个线程尝试重新获取一个新的连接,但是这个重新尝试的次数不应该超过 <code>poolMaximumIdleConnections</code>
1645+
与 <code>poolMaximumLocalBadConnectionTolerance</code> 之和。 默认值:10
1646+
</li>
16421647
<li><code>poolPingQuery</code> – 发送到数据库的侦测查询,用来检验连接是否处在正常工作秩序中并准备接受请求。默认是“NO PING QUERY SET”,这会导致多数数据库驱动失败时带有一个恰当的错误消息。
16431648
</li>
16441649
<li><code>poolPingEnabled</code> – 是否启用侦测查询。若开启,也必须使用一个可执行的 SQL 语句设置 <code>poolPingQuery</code> 属性(最好是一个非常快的 SQL),默认值:false。

0 commit comments

Comments
 (0)