Difference between revisions of "GVDataSources"
(11 intermediate revisions by the same user not shown) | |||
Line 166: | Line 166: | ||
Its subelements are: | Its subelements are: | ||
− | * jndi-name | + | * jndi-name : The JNDI name under which the DataSource wrapper will be bound. Note that this name is relative to the "java:/" prefix unless use-java-context is "false". |
− | * use-java-context | + | * use-java-context : Setting this to "false" will bind the DataSource into global jndi. |
− | * connection-url | + | * connection-url : The JDBC driver connection URL string. |
− | * driver-class | + | * driver-class : The fully qualified name of the JDBC driver class. |
− | * transaction-isolation | + | * transaction-isolation : Set java.sql.Connection transaction isolation level to use. The constants defined in the interface Connection are the possible transaction isolation levels and include: |
− | * connection-property | + | ** TRANSACTION_READ_UNCOMMITTED |
− | * user-name | + | ** TRANSACTION_READ_COMMITTED |
− | * password | + | ** TRANSACTION_REPEATABLE_READ |
+ | ** TRANSACTION_SERIALIZABLE | ||
+ | ** TRANSACTION_NONE | ||
+ | * connection-property : The connection-property element allows you to pass in arbitrary connection properties to the Driver.connect(url, props) method. Each connection-property specifies a string name/value pair with the property name coming from the name attribute and the value coming from the element content. | ||
+ | * user-name : Specifies the default username used when creating a new connection. | ||
+ | * password : Specifies the default password used when creating a new connection. | ||
* (application-managed-security | security-domain | security-domain-and-application) | * (application-managed-security | security-domain | security-domain-and-application) | ||
− | * min-pool-size | + | * min-pool-size : The min-pool-size element indicates the minimum number of connections a pool should hold. These are not created until a Subject is known from a request for a connection. This default to 0. |
− | * max-pool-size | + | * max-pool-size : The max-pool-size element indicates the maximum number of connections for a pool. No more than MaxSize connections will be created in each sub-pool. This defaults to 20. |
− | * blocking-timeout-millis | + | * blocking-timeout-millis : The blocking-timeout-millis element indicates the maximum time in milliseconds to block while waiting for a connection before throwing an exception. Note that this blocks only while waiting for a permit for a connection, and will never throw an exception if creating a new connection takes an inordinately long time. The default is 30000 (30 seconds). |
− | * idle-timeout-minutes | + | * idle-timeout-minutes : The idle-timeout-minutes elements indicates the maximum time in minutes a connection may be idle before being closed. The actual maximum time depends also on the IdleRemover scan time, which is 1/2 the smallest idle-timeout-minutes of any pool. |
− | * no-tx-separate-pools | + | * [[GVDataSources#no-tx-separate-pools|no-tx-separate-pools]] |
− | * new-connection-sql | + | * new-connection-sql : Specifies a SQL statement to execute whenever a connection is added to the connection pool. |
− | * check-valid-connection-sql | + | * check-valid-connection-sql : Specifies an SQL statement to check validity of a pool connection. This may be called when managed connection is taken from pool for use. |
− | * valid-connection-checker-class-name | + | * valid-connection-checker-class-name : An org.jboss.resource.adapter.jdbc.ValidConnectionChecker that provides a SQLException |
− | * exception-sorter-class-name | + | isValidConnection(Connection e) method to validate is a connection is valid. An exception means that the connection will be destroyed. This overrides the check-valid-connection-sql when present. |
− | * track-statements | + | * exception-sorter-class-name : An org.jboss.resource.adapter.jdbc.ExceptionSorter that provides a boolean isExceptionFatal(SQLException e) method to validate is an exception should be broadcast to all javax.resource.spi.ConnectionEventListener as a connectionErrorOccurred message. |
− | * prepared-statement-cache-size | + | * track-statements : Whether to check for unclosed statements when a connection is returned to the pool and result sets are closed when a statement is closed/return to the prepared statement cache. Valid values are: |
− | * depends | + | ** false: do not track statements and results |
− | * type-mapping | + | ** true: track statements and result sets and warn when they are not closed |
+ | ** nowarn: track statements but do no warn about them being unclosed (the default) | ||
+ | * prepared-statement-cache-size : The number of prepared statements per connection in an URL cache. | ||
+ | * [[GVDataSources#depends|depends]] | ||
+ | * type-mapping : This element declares a default type mapping for this datasource. The type mapping should match a type-mapping/name element from standardjbosscmp-jdbc.xml. | ||
+ | |||
+ | ===xa-datasource=== | ||
+ | |||
+ | This element specifies a jca-jdbc XADatasource wrapper. | ||
+ | |||
+ | Its subelements are: | ||
+ | * jndi-name : The JNDI name under which the DataSource wrapper will be bound. Note that this name is relative to the "java:/" prefix unless use-java-context is "false". | ||
+ | * use-java-context : Setting this to "false" will bind the DataSource into global jndi. | ||
+ | * track-connection-by-tx : An element to specify that all intermediate end(suspend) and start(resume) calls. Also, all work on one tx will go through one connection. A side effect of this (currently at least) is that a connection will only be usable by one tx until the tx commits. | ||
+ | * [[GVDataSources#xa-datasource-class|xa-datasource-class]] | ||
+ | * [[GVDataSources#xa-datasource-property|xa-datasource-property]] | ||
+ | * isSameRM-override-value : The isSameRM-override-value element allows one to unconditionally set whether the javax.transaction.xa.XAResource.isSameRM(XAResource) returns "true" or "false". | ||
+ | * transaction-isolation : Set java.sql.Connection transaction isolation level to use. The constants defined in the interface Connection are the possible transaction isolation levels and include: | ||
+ | ** TRANSACTION_READ_UNCOMMITTED | ||
+ | ** TRANSACTION_READ_COMMITTED | ||
+ | ** TRANSACTION_REPEATABLE_READ | ||
+ | ** TRANSACTION_SERIALIZABLE | ||
+ | ** TRANSACTION_NONE | ||
+ | * user-name : Specifies the default username used when creating a new connection. | ||
+ | * password : Specifies the default password used when creating a new connection. | ||
+ | * application-managed-security or security-domain or security-domain-and-application | ||
+ | * min-pool-size : The min-pool-size element indicates the minimum number of connections a pool should hold. These are not created until a Subject is known from a request for a connection. This default to 0. | ||
+ | * max-pool-size : The max-pool-size element indicates the maximum number of connections for a pool. No more than MaxSize connections will be created in each sub-pool. This defaults to 20. | ||
+ | * blocking-timeout-millis : The blocking-timeout-millis element indicates the maximum time in milliseconds to block while waiting for a connection before throwing an exception. Note that this blocks only while waiting for a permit for a connection, and will never throw an exception if creating a new connection takes an inordinately long time. The default is 30000 (30 seconds). | ||
+ | * idle-timeout-minutes : The idle-timeout-minutes elements indicates the maximum time in minutes a connection may be idle before being closed. The actual maximum time depends also on the IdleRemover scan time, which is 1/2 the smallest idle-timeout-minutes of any pool. | ||
+ | * [[GVDataSources#no-tx-separate-pools|no-tx-separate-pools]] | ||
+ | * new-connection-sql : Specifies a SQL statement to execute whenever a connection is added to the connection pool. | ||
+ | * check-valid-connection-sql : Specifies an SQL statement to check validity of a pool connection. This may be called when managed connection is taken from pool for use. | ||
+ | * valid-connection-checker-class-name : An org.jboss.resource.adapter.jdbc.ValidConnectionChecker that provides a SQLException | ||
+ | isValidConnection(Connection e) method to validate is a connection is valid. An exception means that the connection will be destroyed. This overrides the check-valid-connection-sql when present. | ||
+ | * exception-sorter-class-name : An org.jboss.resource.adapter.jdbc.ExceptionSorter that provides a boolean isExceptionFatal(SQLException e) method to validate is an exception should be broadcast to all javax.resource.spi.ConnectionEventListener as a connectionErrorOccurred message. | ||
+ | * track-statements : Whether to check for unclosed statements when a connection is returned to the pool and result sets are closed when a statement is closed/return to the prepared statement cache. Valid values are: | ||
+ | ** false: do not track statements and results | ||
+ | ** true: track statements and result sets and warn when they are not closed | ||
+ | ** nowarn: track statements but do no warn about them being unclosed (the default) | ||
+ | * prepared-statement-cache-size : The number of prepared statements per connection in an URL cache. | ||
+ | * [[GVDataSources#depends|depends]] | ||
+ | * type-mapping : This element declares a default type mapping for this datasource. The type mapping should match a type-mapping/name element from standardjbosscmp-jdbc.xml. | ||
+ | |||
+ | ====xa-datasource-class==== | ||
+ | |||
+ | This element represents the fully qualified name of the javax.sql.XADataSource implementation class. | ||
+ | Its value cannot be null. | ||
+ | |||
+ | ====xa-datasource-property==== | ||
+ | |||
+ | Specifies a property to assign to the XADataSource implementation class. | ||
+ | |||
+ | Each property is identified by the name attribute and the property value is given by the xa-datasource-property element content. | ||
+ | |||
+ | The property is mapped onto the XADataSource implementation by looking for a JavaBeans style getter method for the property name. | ||
+ | If found, the value of the property is set using the JavaBeans setter with the element text translated to the true property type using the java.beans.PropertyEditor for the type. | ||
+ | |||
+ | The following table shows the xa-datasource-property element's attributes: | ||
+ | {|class="gvtable" | ||
+ | ! Attribute !! Type !! Description | ||
+ | |- | ||
+ | | name || required || The xa-datasource-property name attribute specifies the name of the XADataSource attribute the xa-datasource-property element content provides the value of. | ||
+ | The attribute's value can't be null. | ||
+ | |} | ||
+ | |||
+ | ====no-tx-separate-pools==== | ||
+ | |||
+ | Whether to use separated pools for connection retrieved in a transaction and those retrieved outside a transaction. | ||
+ | |||
+ | ===no-tx-datasource=== | ||
+ | |||
+ | This element allows to specify a jca-jdbc non-XADatasource (local) wrapper, using no transactions. | ||
+ | |||
+ | Its subelements are: | ||
+ | * jndi-name : The JNDI name under which the DataSource wrapper will be bound. Note that this name is relative to the "java:/" prefix unless use-java-context is "false". | ||
+ | * use-java-context : Setting this to "false" will bind the DataSource into global jndi. | ||
+ | * connection-url : The JDBC driver connection URL string. | ||
+ | * driver-class : The fully qualified name of the JDBC driver class. | ||
+ | * connection-property : The connection-property element allows you to pass in arbitrary connection properties to the Driver.connect(url, props) method. Each connection-property specifies a string name/value pair with the property name coming from the name attribute and the value coming from the element content. | ||
+ | * user-name : Specifies the default username used when creating a new connection. | ||
+ | * password : Specifies the default password used when creating a new connection. | ||
+ | * application-managed-security or security-domain or security-domain-and-application | ||
+ | * min-pool-size : The min-pool-size element indicates the minimum number of connections a pool should hold. These are not created until a Subject is known from a request for a connection. This default to 0. | ||
+ | * max-pool-size : The max-pool-size element indicates the maximum number of connections for a pool. No more than MaxSize connections will be created in each sub-pool. This defaults to 20. | ||
+ | * blocking-timeout-millis : The blocking-timeout-millis element indicates the maximum time in milliseconds to block while waiting for a connection before throwing an exception. Note that this blocks only while waiting for a permit for a connection, and will never throw an exception if creating a new connection takes an inordinately long time. The default is 30000 (30 seconds). | ||
+ | * idle-timeout-minutes : The idle-timeout-minutes elements indicates the maximum time in minutes a connection may be idle before being closed. The actual maximum time depends also on the IdleRemover scan time, which is 1/2 the smallest idle-timeout-minutes of any pool. | ||
+ | * new-connection-sql : Specifies a SQL statement to execute whenever a connection is added to the connection pool. | ||
+ | * check-valid-connection-sql : Specifies an SQL statement to check validity of a pool connection. This may be called when managed connection is taken from pool for use. | ||
+ | * valid-connection-checker-class-name : An org.jboss.resource.adapter.jdbc.ValidConnectionChecker that provides a SQLException | ||
+ | isValidConnection(Connection e) method to validate is a connection is valid. An exception means that the connection will be destroyed. This overrides the check-valid-connection-sql when present. | ||
+ | * exception-sorter-class-name : An org.jboss.resource.adapter.jdbc.ExceptionSorter that provides a boolean isExceptionFatal(SQLException e) method to validate is an exception should be broadcast to all javax.resource.spi.ConnectionEventListener as a connectionErrorOccurred message. | ||
+ | * track-statements : Whether to check for unclosed statements when a connection is returned to the pool and result sets are closed when a statement is closed/return to the prepared statement cache. Valid values are: | ||
+ | ** false: do not track statements and results | ||
+ | ** true: track statements and result sets and warn when they are not closed | ||
+ | ** nowarn: track statements but do no warn about them being unclosed (the default) | ||
+ | * prepared-statement-cache-size : The number of prepared statements per connection in an URL cache. | ||
+ | * [[GVDataSources#depends|depends]] | ||
+ | * type-mapping : This element declares a default type mapping for this datasource. The type mapping should match a type-mapping/name element from standardjbosscmp-jdbc.xml. |
Latest revision as of 17:04, 14 February 2012
Contents
Description
GVDataSources GreenVulcano® ESB element is the root of the jdbc datasource configuration.
VulCon Configuration
GVDataSources element is present in the Adapter view and used by GVAdapters.
The following table shows the GVDataSources element's attributes:
Attribute | Type | Description |
---|---|---|
type | fixed | This attribute must assume the value module. |
name | fixed | This attribute must assume the value DATASOURCES. |
Might contain one of the following elements:
mbean
The mbean element defines a JBoss MBean service. This includes the mbean class, attributes and dependencies.
The mbean Element is used by: depends, depends-list-element and GVDataSources.
The following table shows the mbean element's attributes:
Attribute | Type | Description |
---|---|---|
code | required | The code attributes gives the fully qualified name of the MBean implementation class. |
name | required | The name attribute gives the JMX ObjectName string to use when registering the MBean.
This must be a unique and valid JMX name. |
interface | optional | The optional interface attribute gives the full qualified name of the class uses to construct the management interface of the mbean.
In absence of it an interface with the name ending by MBean will be looked in the implementation class. When used this interface is defined explicitely. |
Its subelements are:
constructor
The constructor element defines a non-default constructor to use when instantiating the mbean.
The constructor Element is used by: mbean.
Contains the subelemets: arg
arg
The arg element specifies the constructor arguments in the order of the ctor signature.
The following tables show the arg element's attributes:
Attribute | Type | Description |
---|---|---|
type | optional | The type attribute gives the type of the argument as defined in the ctor signature.
If not defined java.lang.String is assumed. The attribute's value can't be null. |
value | required | The value attribute provides the string representation of the ctor argument.
It is converted from a string to type using Java PropertyEditor or a ctor taking a single string as its argument. The attribute's value can't be null. |
xmbean
The xmbean element specifies a nested JBoss XMBean descriptor fragment.
Its supported content model is the same as the mbean element of the jboss_xmbean_1_0.dtd Ex: <xmbean> ... </xmbean>
The element value can't be null.
attribute
The attribute element specifies the initial value for a management attribute of the enclosing mbean.
Typically the value of the attribute element is the string representation of the attribute, but it can be an arbitrary xml fragment that is parsed by the mbean.
The following table shows the attribute element's attributes:
Attribute | Type | Description |
---|---|---|
name | required | The required name attribute gives the name of the attribute.
This is the name exposed by the mbean to the MBeanServer for the attribute. The attribute's value can't be null. |
replace | optional | The optional replace attribute indicates whether references of the form ${x} in the attribute element content should be replaced with the corresponding System.getProperty(x) value.
The attribute's default value is: true. |
trim | optional | The optional trim attribute specifies whether the attribute element content should be trimmed of whitespace.
The attribute's default value is: true. |
attributeClass | optional | The attributeClass attribute specifies the type of object that should be created.
This is needed for non-concrete attribute types like interfaces and abstract classes. The attribute's value can't be null. |
serialDataType | optional | The serialDataType defines how the content of the attribute element is interpreted by the ServiceConfigurator.
The possible values are:
PropertyEditor registered for the attribute type.
The attribute's default value is: text. |
depends
The depends element specifies the JMX ObjectName string of a service that the connection manager services depend on or a JMX ObjectName string for a mbean on which the enclosing mbean depends.
The depends Element is used by: local-tx-datasource, mbean, no-tx-datasource, xa-datasource.
The following table shows the depends element's attributes:
Attribute | Type | Description |
---|---|---|
optional-attribute-name | optional | The optional-attribute-name attribute specifies the attribute name which should be populated with the JMX ObjectName of the depends element.
This allows an mbean to have access to the name of the mbean on which it depends. The attribute's value can't be null. |
proxy-type | optional | The proxy-type attribute specifies the interface name that should be exposed on an MBeanProxy pointing at the dependent MBean specified by the JMX ObjectName.
The special value proxy-type="attribute" will use the class declared in the MBeanAttributeInfo as the interface for MBeanProxy. The attribute's value can't be null. |
depends-list
The depends-list element specifies a series of JMX ObjectName strings for a mbeans on which the enclosing mbean depends. This is done using
The following table shows the depends-list element's attributes:
Attribute | Type | Description |
---|---|---|
optional-attribute-name | optional | The optional-attribute-name attribute specifies the attribute name which should be populated with the JMX ObjectName[] array of the depends-list elements.
This allows an mbean to have access to the names of the mbean on which it depends. The attribute's value can't be null. |
Contains the depends-list-element elements. Might contain the mbean element.
depends-list-element
The depends-list-element element specifies a JMX ObjectName string for a mbean on which the enclosing mbean depends. The depends-list-element Element is used by: depends-list.
Might contain the mbean element.
local-tx-datasource
Specify a jca-jdbc non-XADatasource (local) wrapper, using local transactions. The local-tx-datasource Element is used by: GVDataSources.
Its subelements are:
- jndi-name : The JNDI name under which the DataSource wrapper will be bound. Note that this name is relative to the "java:/" prefix unless use-java-context is "false".
- use-java-context : Setting this to "false" will bind the DataSource into global jndi.
- connection-url : The JDBC driver connection URL string.
- driver-class : The fully qualified name of the JDBC driver class.
- transaction-isolation : Set java.sql.Connection transaction isolation level to use. The constants defined in the interface Connection are the possible transaction isolation levels and include:
- TRANSACTION_READ_UNCOMMITTED
- TRANSACTION_READ_COMMITTED
- TRANSACTION_REPEATABLE_READ
- TRANSACTION_SERIALIZABLE
- TRANSACTION_NONE
- connection-property : The connection-property element allows you to pass in arbitrary connection properties to the Driver.connect(url, props) method. Each connection-property specifies a string name/value pair with the property name coming from the name attribute and the value coming from the element content.
- user-name : Specifies the default username used when creating a new connection.
- password : Specifies the default password used when creating a new connection.
- (application-managed-security | security-domain | security-domain-and-application)
- min-pool-size : The min-pool-size element indicates the minimum number of connections a pool should hold. These are not created until a Subject is known from a request for a connection. This default to 0.
- max-pool-size : The max-pool-size element indicates the maximum number of connections for a pool. No more than MaxSize connections will be created in each sub-pool. This defaults to 20.
- blocking-timeout-millis : The blocking-timeout-millis element indicates the maximum time in milliseconds to block while waiting for a connection before throwing an exception. Note that this blocks only while waiting for a permit for a connection, and will never throw an exception if creating a new connection takes an inordinately long time. The default is 30000 (30 seconds).
- idle-timeout-minutes : The idle-timeout-minutes elements indicates the maximum time in minutes a connection may be idle before being closed. The actual maximum time depends also on the IdleRemover scan time, which is 1/2 the smallest idle-timeout-minutes of any pool.
- no-tx-separate-pools
- new-connection-sql : Specifies a SQL statement to execute whenever a connection is added to the connection pool.
- check-valid-connection-sql : Specifies an SQL statement to check validity of a pool connection. This may be called when managed connection is taken from pool for use.
- valid-connection-checker-class-name : An org.jboss.resource.adapter.jdbc.ValidConnectionChecker that provides a SQLException
isValidConnection(Connection e) method to validate is a connection is valid. An exception means that the connection will be destroyed. This overrides the check-valid-connection-sql when present.
- exception-sorter-class-name : An org.jboss.resource.adapter.jdbc.ExceptionSorter that provides a boolean isExceptionFatal(SQLException e) method to validate is an exception should be broadcast to all javax.resource.spi.ConnectionEventListener as a connectionErrorOccurred message.
- track-statements : Whether to check for unclosed statements when a connection is returned to the pool and result sets are closed when a statement is closed/return to the prepared statement cache. Valid values are:
- false: do not track statements and results
- true: track statements and result sets and warn when they are not closed
- nowarn: track statements but do no warn about them being unclosed (the default)
- prepared-statement-cache-size : The number of prepared statements per connection in an URL cache.
- depends
- type-mapping : This element declares a default type mapping for this datasource. The type mapping should match a type-mapping/name element from standardjbosscmp-jdbc.xml.
xa-datasource
This element specifies a jca-jdbc XADatasource wrapper.
Its subelements are:
- jndi-name : The JNDI name under which the DataSource wrapper will be bound. Note that this name is relative to the "java:/" prefix unless use-java-context is "false".
- use-java-context : Setting this to "false" will bind the DataSource into global jndi.
- track-connection-by-tx : An element to specify that all intermediate end(suspend) and start(resume) calls. Also, all work on one tx will go through one connection. A side effect of this (currently at least) is that a connection will only be usable by one tx until the tx commits.
- xa-datasource-class
- xa-datasource-property
- isSameRM-override-value : The isSameRM-override-value element allows one to unconditionally set whether the javax.transaction.xa.XAResource.isSameRM(XAResource) returns "true" or "false".
- transaction-isolation : Set java.sql.Connection transaction isolation level to use. The constants defined in the interface Connection are the possible transaction isolation levels and include:
- TRANSACTION_READ_UNCOMMITTED
- TRANSACTION_READ_COMMITTED
- TRANSACTION_REPEATABLE_READ
- TRANSACTION_SERIALIZABLE
- TRANSACTION_NONE
- user-name : Specifies the default username used when creating a new connection.
- password : Specifies the default password used when creating a new connection.
- application-managed-security or security-domain or security-domain-and-application
- min-pool-size : The min-pool-size element indicates the minimum number of connections a pool should hold. These are not created until a Subject is known from a request for a connection. This default to 0.
- max-pool-size : The max-pool-size element indicates the maximum number of connections for a pool. No more than MaxSize connections will be created in each sub-pool. This defaults to 20.
- blocking-timeout-millis : The blocking-timeout-millis element indicates the maximum time in milliseconds to block while waiting for a connection before throwing an exception. Note that this blocks only while waiting for a permit for a connection, and will never throw an exception if creating a new connection takes an inordinately long time. The default is 30000 (30 seconds).
- idle-timeout-minutes : The idle-timeout-minutes elements indicates the maximum time in minutes a connection may be idle before being closed. The actual maximum time depends also on the IdleRemover scan time, which is 1/2 the smallest idle-timeout-minutes of any pool.
- no-tx-separate-pools
- new-connection-sql : Specifies a SQL statement to execute whenever a connection is added to the connection pool.
- check-valid-connection-sql : Specifies an SQL statement to check validity of a pool connection. This may be called when managed connection is taken from pool for use.
- valid-connection-checker-class-name : An org.jboss.resource.adapter.jdbc.ValidConnectionChecker that provides a SQLException
isValidConnection(Connection e) method to validate is a connection is valid. An exception means that the connection will be destroyed. This overrides the check-valid-connection-sql when present.
- exception-sorter-class-name : An org.jboss.resource.adapter.jdbc.ExceptionSorter that provides a boolean isExceptionFatal(SQLException e) method to validate is an exception should be broadcast to all javax.resource.spi.ConnectionEventListener as a connectionErrorOccurred message.
- track-statements : Whether to check for unclosed statements when a connection is returned to the pool and result sets are closed when a statement is closed/return to the prepared statement cache. Valid values are:
- false: do not track statements and results
- true: track statements and result sets and warn when they are not closed
- nowarn: track statements but do no warn about them being unclosed (the default)
- prepared-statement-cache-size : The number of prepared statements per connection in an URL cache.
- depends
- type-mapping : This element declares a default type mapping for this datasource. The type mapping should match a type-mapping/name element from standardjbosscmp-jdbc.xml.
xa-datasource-class
This element represents the fully qualified name of the javax.sql.XADataSource implementation class. Its value cannot be null.
xa-datasource-property
Specifies a property to assign to the XADataSource implementation class.
Each property is identified by the name attribute and the property value is given by the xa-datasource-property element content.
The property is mapped onto the XADataSource implementation by looking for a JavaBeans style getter method for the property name. If found, the value of the property is set using the JavaBeans setter with the element text translated to the true property type using the java.beans.PropertyEditor for the type.
The following table shows the xa-datasource-property element's attributes:
Attribute | Type | Description |
---|---|---|
name | required | The xa-datasource-property name attribute specifies the name of the XADataSource attribute the xa-datasource-property element content provides the value of.
The attribute's value can't be null. |
no-tx-separate-pools
Whether to use separated pools for connection retrieved in a transaction and those retrieved outside a transaction.
no-tx-datasource
This element allows to specify a jca-jdbc non-XADatasource (local) wrapper, using no transactions.
Its subelements are:
- jndi-name : The JNDI name under which the DataSource wrapper will be bound. Note that this name is relative to the "java:/" prefix unless use-java-context is "false".
- use-java-context : Setting this to "false" will bind the DataSource into global jndi.
- connection-url : The JDBC driver connection URL string.
- driver-class : The fully qualified name of the JDBC driver class.
- connection-property : The connection-property element allows you to pass in arbitrary connection properties to the Driver.connect(url, props) method. Each connection-property specifies a string name/value pair with the property name coming from the name attribute and the value coming from the element content.
- user-name : Specifies the default username used when creating a new connection.
- password : Specifies the default password used when creating a new connection.
- application-managed-security or security-domain or security-domain-and-application
- min-pool-size : The min-pool-size element indicates the minimum number of connections a pool should hold. These are not created until a Subject is known from a request for a connection. This default to 0.
- max-pool-size : The max-pool-size element indicates the maximum number of connections for a pool. No more than MaxSize connections will be created in each sub-pool. This defaults to 20.
- blocking-timeout-millis : The blocking-timeout-millis element indicates the maximum time in milliseconds to block while waiting for a connection before throwing an exception. Note that this blocks only while waiting for a permit for a connection, and will never throw an exception if creating a new connection takes an inordinately long time. The default is 30000 (30 seconds).
- idle-timeout-minutes : The idle-timeout-minutes elements indicates the maximum time in minutes a connection may be idle before being closed. The actual maximum time depends also on the IdleRemover scan time, which is 1/2 the smallest idle-timeout-minutes of any pool.
- new-connection-sql : Specifies a SQL statement to execute whenever a connection is added to the connection pool.
- check-valid-connection-sql : Specifies an SQL statement to check validity of a pool connection. This may be called when managed connection is taken from pool for use.
- valid-connection-checker-class-name : An org.jboss.resource.adapter.jdbc.ValidConnectionChecker that provides a SQLException
isValidConnection(Connection e) method to validate is a connection is valid. An exception means that the connection will be destroyed. This overrides the check-valid-connection-sql when present.
- exception-sorter-class-name : An org.jboss.resource.adapter.jdbc.ExceptionSorter that provides a boolean isExceptionFatal(SQLException e) method to validate is an exception should be broadcast to all javax.resource.spi.ConnectionEventListener as a connectionErrorOccurred message.
- track-statements : Whether to check for unclosed statements when a connection is returned to the pool and result sets are closed when a statement is closed/return to the prepared statement cache. Valid values are:
- false: do not track statements and results
- true: track statements and result sets and warn when they are not closed
- nowarn: track statements but do no warn about them being unclosed (the default)
- prepared-statement-cache-size : The number of prepared statements per connection in an URL cache.
- depends
- type-mapping : This element declares a default type mapping for this datasource. The type mapping should match a type-mapping/name element from standardjbosscmp-jdbc.xml.