proxool参数

proxool parameter :


alias
driver-url
driver-class
driver-properties

[b]house-keeping-sleep-time[/b]:house keeper 保留线程处于睡眠状态的最长时间,house keeper 的职责就是检查各个连接的状态,并判断是否需要销毁或者创建

[b]house-keeping-test-sql[/b]:如果发现了空闲的数据库连接.house keeper 将会用这个语句来测试.这个语句最好非常快的被执行.如果没有定义,测试过程将会被忽略。

maximum-connection-count
minimum-connection-count
maximum-connection-lifetime
maximum-new-connections
simultaneous-build-throttle
recently-started-threshold
overload-without-refusal-lifetime
maximum-active-time

[b]fatal-sql-exception[/b] :它是一个逗号分割的信息片段,当一个SQL异常发生时,他的异常信息将与这个信息片段进行比较,如果在片段中存在,那么这个异常将被认为是个致命错误(Fatal SQL Exception )。这种情况下,数据库连接将要被放弃,无论发生什么,这个异常将会被重掷以提供给消费者。用户可以自己配置一个不同的异常来抛出

[b]fatal-sql-exception-wrapper-class[/b]:正如上面所说,你配置一个不同的异常来重掷.利用这个属性,用户可以包装SQLException,使他变成另外一个异常.这个异常或者继承SQLException或者继承字RuntimeException.proxool自带了2个实现:'org.logicalcobwebs.proxool.FatalSQLException' 和'org.logicalcobwebs.proxool.FatalRuntimeException' .后者更合适.

prototype-count
statistics
statistics-log-level
trace
verbose



<?xml version="1.0" encoding="UTF-8"?>
<!ELEMENT proxool-config (proxool+)>
<!ELEMENT proxool (alias, driver-url, driver-class, driver-properties?, house-keeping-sleep-time?, house-keeping-test-sql?, maximum-connection-count?, minimum-connection-count?, maximum-connection-lifetime?, maximum-new-connections?, simultaneous-build-throttle?, recently-started-threshold?, overload-without-refusal-lifetime?, maximum-active-time?, verbose?, trace?, fatal-sql-exception*, prototype-count?, statistics?, statistics-log-level?)>
<!-- This is the alias for the pool -->
<!ELEMENT alias (#PCDATA)>
<!-- The delegate driver we are delegating to
(for instance, org.hsqldb.jdbcDriver) -->
<!ELEMENT driver-class (#PCDATA)>
<!-- The URL the delegate driver uses
(for instance, jdbc:hsqldb:test) -->
<!ELEMENT driver-url (#PCDATA)>
<!-- If the connection cound it less than this then the housekeeper will build some more
Defaults to zero. -->
<!ELEMENT minimum-connection-count (#PCDATA)>
<!-- The maximum amount of connections to the database. Defaults to 15. -->
<!ELEMENT maximum-connection-count (#PCDATA)>
<!-- Any idle connections older than this will be removed by the housekeeper (milliseconds).
Defaults to 4 * 60 * 60 * 1000 (4 hours). -->
<!ELEMENT maximum-connection-lifetime (#PCDATA)>
<!-- This is the maximum number of connections we can be building at any one time. That is,
the number of new connections that have been requested but aren't yet available for use.
Defaults to 10. -->
<!ELEMENT maximum-new-connections (#PCDATA)>
<!-- This is the maximum number of connections we can be building at any one time. That is,
the number of new connections that have been requested but aren't yet available for use.
Defaults to 10. -->
<!ELEMENT simultaneous-build-throttle (#PCDATA)>
<!-- How long the house keeping thread sleeps for (milliseconds). Defaults to
30000 (30 seconds) -->
<!ELEMENT house-keeping-sleep-time (#PCDATA)>
<!-- If the house keeping thread finds and idle connections it will test them with this SQL statement.
It should be _very_ quick to execute. Something like checking the current date or something. If
not defined then this test is omitted. -->
<!ELEMENT house-keeping-test-sql (#PCDATA)>
<!-- If there are fewer than this number of connections available then we will build some more
(assuming the maximum-connection-count is not exceeded). Defaults to zero. -->
<!ELEMENT prototype-count (#PCDATA)>
<!-- This helps us determine whether the pool status. As long as at least one connection was
started within this threshold (milliseconds) or there are some spare connections available
then we assume the pool is up. Defaults to 60 seconds. -->
<!ELEMENT recently-started-threshold (#PCDATA)>
<!-- This helps us determine the pool status. If we have refused a connection within this threshold
(milliseconds) then we are overloaded. Defaults to 60 seconds. -->
<!ELEMENT overload-without-refusal-lifetime (#PCDATA)>
<!-- If a connection is active for longer than this (milliseconds) then we assume it has stalled or
something. And we kill it. Defaults to 5 minutes. -->
<!ELEMENT maximum-active-time (#PCDATA)>
<!-- Either false (quiet) or true (loud). Default is false. -->
<!ELEMENT verbose (#PCDATA)>
<!-- If true then every execution will be logged. Default is false. -->
<!ELEMENT trace (#PCDATA)>
<!-- All SQLExceptions are caught and tested for containing this text fragment. If it matches than
this connection is considered useless and it is discarded. Regardless of what happens the
exception is always thrown again. This property behaves like a collection; you can set it more
than once and each value is checked. -->
<!ELEMENT fatal-sql-exception (#PCDATA)>
<!-- This contains all the properties that are passed onto the
delegate driver. -->
<!ELEMENT driver-properties (property*)>
<!-- Each property is a simple name-value pair. -->
<!ELEMENT property EMPTY>
<!ATTLIST property
name CDATA #REQUIRED
value CDATA #REQUIRED
>
<!-- The sample length when taking statistical information, comma-delimited. For example: '10s,15m'
would mean take samples every 10 seconds and every 15 minutes. Valid units are s(econds),
m(inutes), h(ours) and d(ays). Default is no statistics -->
<!ELEMENT statistics (#PCDATA)>
<!-- Whether statistics are logged as they are produced. Range: DEBUG, INFO, WARN, ERROR, FATAL.
Not to be confused with the level used with the general log. You have to configure that
separately. Default is no logging -->
<!ELEMENT statistics-log-level (#PCDATA)>
<!--
Revision history:
$Log: proxool.dtd,v $
Revision 1.5 2004/03/17 10:51:48 brenuart
Add statistics & statistics-log-level elements
Revision 1.4 2003/03/05 23:28:56 billhorsman
deprecated maximum-new-connections property in favour of
more descriptive simultaneous-build-throttle
Revision 1.3 2003/03/03 11:12:01 billhorsman
fixed licence
Revision 1.2 2003/01/23 10:41:05 billhorsman
changed use of pool-name to alias for consistency
Revision 1.1 2002/12/16 01:04:31 chr32
Moved from parent package.
Revision 1.3 2002/12/15 23:27:50 chr32
Clarified som names.
Revision 1.2 2002/12/11 01:13:15 billhorsman
with doc
Revision 1.1 2002/12/11 00:55:09 billhorsman
draft
-->
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值