Property Name | Description |
---|
JtaManaged | Determines wether or not this data source should be JTA managed or user managed. HTML |
---|
Wiki Markup |
---|
{html} {html} | If set to 'true' it will automatically be enrolled in any ongoing transactions. HTML |
---|
Wiki Markup |
---|
{html} {html} | Calling begin/commit/rollback or setAutoCommit on the datasource or connection will not be allowed. Wiki Markup |
---|
{html | } {html} | If you need to perform these functions yourself, set JtaManaged to 'false'
In terms of JPA persistence.xml: "JtaManaged=true" can be used as a 'jta-data-source' "JtaManaged=false" can be used as a 'non-jta-data-source'
Default value is true. |
JdbcDriver | Driver class name
Default value is org.hsqldb.jdbcDriver. |
JdbcUrl | Url for creating connections
Default value is jdbc:hsqldb: HTML |
---|
Wiki Markup |
---|
{html}file:{html} | data/hsqldb/hsqldb. |
UserName | Default user name
Default value is sa. |
Password | Default password |
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="9ae2d74f-56c2-49cd-b733-fb31251fdc45"><ac:plain-text-body><![CDATA[ | ConnectionProperties ConnectionProperties | The connection properties that will be sent to the JDBC driver when establishing new connections
Format of the string must be [propertyName=property;]*
NOTE - The "user" and "password" properties will be passed explicitly, so they do not need to be included here.]]></ac:plain-text-body></ac:structured-macro> |
DefaultAutoCommit | The default auto-commit state of new connections
Default value is true. |
DefaultReadOnly | The default read-only state of new connections If not set then the setReadOnly method will not be called. (Some drivers don't support read only mode, ex: Informix) |
DefaultTransactionIsolation | The default TransactionIsolation state of new connections If not set then the setTransactionIsolation method will not be called. The allowed values for this property are:
Wiki Markup |
---|
{html} | HTML |
---|
{html} | NONE
Wiki Markup |
---|
{html} | HTML |
---|
{html} | READ_COMMITTED
Wiki Markup |
---|
{html | } ;{html} | READ_UNCOMMITTED
Wiki Markup |
---|
{html} | HTML |
---|
{html} | REPEATABLE_READ
Wiki Markup |
---|
{html | } {html} | SERIALIZABLE
Note: Most JDBC drivers do not support all isolation levels |
InitialSize | The initial number of connections that are created when the pool is started
Default value is 0. |
MaxActive | The maximum number of active connections that can be allocated from this pool at the same time, or a negative number for no limit.
Default value is 20. |
MaxIdle | The maximum number of connections that can remain idle in the pool, without extra ones being released, or a negative number for no limit.
Default value is 20. |
MinIdle | The minimum number of connections that can remain idle in the pool, without extra ones being created, or zero to create none.
Default value is 0. |
MaxWait | The maximum number of milliseconds that the pool will wait (when there are no available connections) for a connection to be returned before throwing an exception, or -1 to wait indefinitely.
Default value is -1. |
ValidationQuery | The SQL query that will be used to validate connections from this pool before returning them to the caller. If specified, this query MUST be an SQL SELECT statement that returns at least one row. |
TestOnBorrow | If true connections will be validated before being returned from the pool. If the validation fails, the connection is destroyed, and a new conection will be retrieved from the pool (and validated).
NOTE - for a true value to have any effect, the ValidationQuery parameter must be set.
Default value is true. |
TestOnReturn | If true connections will be validated before being returned to the pool. HTML |
---|
Wiki Markup |
---|
{html} {html} | If the validation fails, the connection is destroyed instead of being returned to the pool.
NOTE - for a true value to have any effect, the ValidationQuery parameter must be set.
Default value is false. |
TestWhileIdle | If true connections will be validated by the idle connection evictor (if any). If the validation fails, the connection is destroyed and removed from the pool
NOTE - for a true value to have any effect, the timeBetweenEvictionRunsMillis property must be a positive number and the ValidationQuery parameter must be set.
Default value is false. |
TimeBetweenEvictionRunsMillis | The number of milliseconds to sleep between runs of the idle connection evictor thread. When set to a negative number, no idle connection evictor thread will be run.
Default value is -1. |
NumTestsPerEvictionRun | The number of connectionss to examine during each run of the idle connection evictor thread (if any).
Default value is 3. |
MinEvictableIdleTimeMillis | The minimum amount of time a connection may sit idle in the pool before it is eligable for eviction by the idle connection evictor (if any).
Default value is 1800000. |
PoolPreparedStatements | If true, a statement pool is created for each Connection and PreparedStatements created by one of the following methods are pooled:
Wiki Markup |
---|
{html} | HTML |
---|
;{html} | public PreparedStatement prepareStatement(String sql);
Wiki Markup |
---|
{html} | HTML |
---|
{html} | public PreparedStatement prepareStatement(String sql,
Wiki Markup |
---|
{html | } {html} | HTML |
---|
Wiki Markup |
---|
{html} {html} |
Wiki Markup |
---|
{html} | HTML |
---|
;{html} | int resultSetType,
Wiki Markup |
---|
{html} | HTML |
---|
{html} |
Wiki Markup |
---|
{html | } {html} | HTML |
---|
Wiki Markup |
---|
{html} {html} | int resultSetConcurrency)
Default value is false. |
MaxOpenPreparedStatements | The maximum number of open statements that can be allocated from the statement pool at the same time, or zero for no limit.
NOTE - Some drivers have limits on the number of open statements, so make sure there are some resources left for the other (non-prepared) statements.
Default value is 0. |
AccessToUnderlyingConnectionAllowed | If true the raw physical connection to the database can be accessed using the following construct:
Wiki Markup |
---|
{html} | HTML |
---|
;{html} | Connection conn = ds.getConnection();
Wiki Markup |
---|
{html} | HTML |
---|
{html} | Connection rawConn = ((DelegatingConnection) conn).getInnermostDelegate();
Wiki Markup |
---|
{html | } {html} | ...
Wiki Markup |
---|
{html} | HTML |
---|
{html} | conn.close()
Default is false, because misbehaving programs can do harmfull things to the raw connection shuch as closing the raw connection or continuing to use the raw connection after it has been assigned to another logical connection. HTML |
---|
Wiki Markup |
---|
{html} {html} | Be carefull and only use when you need direct access to driver specific extentions.
NOTE: Do NOT close the underlying connection, only the original logical connection wrapper.
Default value is false. |