This is the full list of all the properties:
fatal-sql-exception:
A comma separated list of message fragments. When an SQLException
occurs its message is compared to each of these fragments. If it
contains any of them (case sensitive) then it is detected as a Fatal SQL
Exception. This causes that connection to be discarded. Regardless of
what happens, the exception is thrown again so that the user knows what
has happened. You can optionally configure a different exception to be
thrown (see fatal-sql-exception-wrapper-class property) Default is null.
fatal-sql-exception-wrapper-class:
If you have configured fatal-sql-exception then the default
behaviour is to discard the exception that causes the fatal SQLException
and then just throw the original exception to the user. Using this
property you can wrap the SQLException up inside another exception. This
exception can be anything you want as long as it either extends
SQLException or RuntimeException. Proxool provides two classes which you
can use if you don't want to build your own: FatalSQLException and
FatalRuntimeException. To make use of those you should set this property
to either 'org.logicalcobwebs.proxool.FatalSQLException' or
'org.logicalcobwebs.proxool.FatalRuntimeException' as appropriate.
Default is null (fatal SQLExceptions are not wrapped). Default is null.
house-keeping-sleep-time:
How long the house keeping thread sleeps for (milliseconds). The
house keeper is responsible for checking the state of all the
connections and tests whether any need to be destroyed or created.
Default is 30 seconds.
house-keeping-test-sql:
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.
injectable-connection-interface:
Allows Proxool to implement methods defined in the delegate Connection object. See Injectable Interfaces.
injectable-statement-interface:
Allows Proxool to implement methods defined in the delegate Statement object. See Injectable Interfaces.
injectable-prepared-statement-interface:
Allows Proxool to implement methods defined in the delegate PreparedStatement object. See Injectable Interfaces.
injectable-callable-statement-interface:
Allows Proxool to implement methods defined in the delegate CallableStatement object. See Injectable Interfaces.
jmx:
If true the pool will be registered as an MBean to a JMX server with
the following object name: "Proxool:type=Pool, name=<alias>".
Default is false.
jmx-agent-id:
A comma separated list of JMX agent ids (as used by
MBeanServerFactory.findMBeanServer(String agentId) ) to register the
pool to. This property is only used if the "jmx" property is set to
"true". All registered JMX servers will be used if this property is not
set.
jndi-name:
See DataSource.
maximum-active-time:
If the housekeeper comes across a thread that has been active for
longer than this then it will kill it. So make sure you set this to a
number bigger than your slowest expected response! Default is 5 minutes.
maximum-connection-count:
The maximum number of connections to the database. Default is 15.
maximum-connection-lifetime:
The maximum amount of time that a connection exists for before it is killed (milliseconds). Default is 4 hours.
maximum-new-connections:
Deprecated. Use simultaneous-build-throttle instead.
minimum-connection-count:
The minimum number of connections we will keep open, regardless of whether anyone needs them or not. Default is 5.
overload-without-refusal-lifetime:
This helps us determine the pool status. If we have refused a
connection within this threshold (milliseconds) then we are overloaded.
Default is 60 seconds.
prototype-count:
If there are fewer than this number of connections available then we
will build some more (assuming the maximum-connection-count is not
exceeded). For example. Of we have 3 active connections and 2 available,
but our prototype-count is 4 then it will attempt to build another 2.
This differs from minimum-connection-count because it takes into account
the number of active connections. minimum-connection-count is absolute
and doesn't care how many are in use. prototype-count is the number of
spare connections it strives to keep over and above the ones that are
currently active. Default is 0.
recently-started-threshold:
This helps us determine whether the pool status is up, down or
overloaded. 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. Default is 60 seconds.
simultaneous-build-throttle:
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. Because connections can be
built using more than one thread (for instance, when they are built on
demand) and it takes a finite time between deciding to build the
connection and it becoming available we need some way of ensuring that a
lot of threads don't all decide to build a connection at once. (We
could solve this in a smarter way - and indeed we will one day) Default
is 10.
statistics:
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 null (no statistics).
statistics-log-level:
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 null
(no logging).
test-before-use:
If you set this to true then each connection is tested (with
whatever is defined in house-keeping-test-sql) before being served. If a
connection fails then it is discarded and another one is picked. If all
connections fail a new one is built. If that one fails then you get an
SQLException saying so.
test-after-use:
If you set this to true then each connection is tested (with
whatever is defined in house-keeping-test-sql) after it is closed (that
is, returned to the connection pool). If a connection fails then it is
discarded.
trace:
If true then each SQL call gets logged (DEBUG level) along with the
execution time. You can also get this information by registering a
ConnectionListener (see ProxoolFacade). Default is false.
verbose:
Either false (quiet) or true (loud). Default is false.
分享到:
相关推荐
下面将详细讲解Proxool连接池的使用方法及其核心概念。 1. **Proxool简介** Proxool是Apache软件基金会的一个开源项目,它提供了一个轻量级的数据库连接池实现。Proxool通过创建一个数据库连接池来管理数据库连接...
2. **使用说明**:这份文档详细阐述了如何在Proxool连接池配置中使用加密的用户名和密码。它可能涵盖了以下步骤: - **加密过程**:说明如何使用提供的jar文件对数据库的用户名和密码进行加密,生成可以安全存储的...
本篇将详细介绍如何在Hibernate中配置Proxool连接池。 首先,我们需要在Spring的配置文件`applicationContext.xml`中设置SessionFactory Bean。SessionFactory是Hibernate的核心组件,它负责创建Session对象,而...
在本压缩包中,包含的是与Proxool连接池相关的MySQL驱动jar包,这将有助于在Java应用程序中建立与MySQL数据库的连接。 首先,我们来深入理解一下Proxool连接池。Proxool的核心功能是创建一个池化的数据库连接集合,...
Proxool连接池是数据库连接管理的一个开源工具,它提供了一种高效且灵活的方式来管理和复用数据库连接,以提升应用程序的性能和响应速度。在Java应用程序中,尤其是在高并发环境下,数据库连接池扮演着至关重要的...
【Proxool 连接池】是一个高效且可扩展的数据库连接池,它通过复用已存在的数据库连接,显著提高了数据库操作的性能。连接池管理数据库连接的分配、监控和释放,防止因未正确释放连接而导致的资源浪费。Proxool 设计...
在这里,我们通过`dataSource`属性引用了上面配置的数据源,这样Hibernate就能使用Proxool连接池进行数据库操作。 5. 在`hibernateProperties`中,我们设置了`hibernate.dialect`为`MySQLDialect`,表示使用的是...
**JSP与Proxool连接池的深度解析** 在Java Web开发中,数据库连接管理是一项重要的任务,它直接影响到应用程序的性能和资源利用率。`JSP`(JavaServer Pages)作为动态网页技术,常常需要与数据库进行交互。为了...
### Proxool连接池知识点详解 #### 一、Proxool连接池简介 Proxool是Logical Cobwebs公司开发的一款轻量级的JDBC...以上内容详细介绍了Proxool连接池的相关配置和使用方法,有助于开发者更好地理解和应用这一技术。
Proxool是其中一个轻量级、开源的数据库连接池实现,它提供了灵活的配置和监控功能。 Proxool的工作原理: 1. 当应用程序需要数据库连接时,不再直接创建新的连接,而是从连接池中获取已经建立好的连接。 2. 如果...
下面我们将深入探讨Proxool连接池的使用、配置以及其核心概念。 **一、Proxool简介** Proxool是由iBatis团队开发的,其设计目标是提供一个简单易用、功能全面且性能优异的数据库连接池。与C3P0、DBCP、HikariCP等...
本文将详细介绍Proxool连接池及其所需的jar包。 **1. Proxool简介** Proxool是Proxy + Pool的缩写,由James果蝇项目(James Project)开发,它是一个轻量级的开源数据库连接池。Proxool通过创建数据库连接的代理来...
在Spring中配置Proxool连接池,通常需要在XML配置文件(如proxoolconf.xml)中定义连接池的相关属性,例如: ```xml <prop key="driverClassName">com.mysql.jdbc.Driver</prop> ...
proxool-0.9.1(my).jar 包是我修改了proxool-0.9.1后的jar包,修改后可以完全支持spring配置,并添加了charSet配置属性,用于配置数据库链接的设置默认字符集,并且解决了proxool数据库连接池报如下错误的问题:...
Proxool是Apache软件基金会的一个开源项目,提供了一个轻量级、高性能的数据库连接池解决方案。本篇文章将深入探讨Proxool数据库连接池的配置及其重要性。 首先,理解Proxool的基本概念是必要的。Proxool是Proxy + ...
本文将详细介绍如何在Struts2+Spring+Hibernate的环境中配置Proxool连接池。 首先,理解Proxool的工作原理。Proxool是一个基于池化的JDBC代理,它维护着一个数据库连接池,当应用需要访问数据库时,可以从池中获取...
其中,`proxyConfigUrl`属性指向Proxool的配置文件,该文件可以定义更详细的连接池参数,如连接超时、空闲检查频率等。 最后,应用需要通过JNDI查找方式来获取连接池的DataSource对象,以进行数据库操作。在Java...
总的来说,理解并熟练运用FCK在线编译器的JSP自定义函数和Proxool连接池配置,能够帮助开发者构建出更加高效、灵活的Web应用,同时优化数据库操作性能,提升用户体验。在实际开发过程中,结合文档学习和实践,可以更...