Red Hat Training

A Red Hat training course is available for Red Hat JBoss Operations Network

3.2.2. JBossAS5 - No Tx Datasource Service

Overview

Table 3.101. Overview

Description:No Transaction Datasources deployed in the instance of JBoss AS
Singleton: no
Plugin:JBossAS5

Child Resource Types

none

Connection Properties

Table 3.102. 

NameDescriptionRequiredInternal Name
Component Type  yes componentType
Component Subtype  yes componentSubtype
Component Name  yes componentName
Template Name  yes templateName
Component Name PropertyThe name of the Resource configuration property whose value should be used as the ManagedComponent name when creating a new Resource of this type. yes componentNameProperty

Note

You must use the internal name to reference Configuration Properties in Dynamic Group Definition expressions.

Metrics

Table 3.103. Metrics

NameTypeDescriptionInternal Name
Run StatetraitRun StaterunState
Connection Available?traitcould a connection to the underlying data provider be obtained? Please see the documentation before enabling this metriccustom.connectionAvailable
Pool JNDI Nametraitthe JNDI name of the connection pool for this datasourcepoolJndiName
Available Connection Countmeasurementthe maximum number of connections that are availableavailableConnectionCount
Connection Countmeasurementthe number of connections that are currently in the poolconnectionCount
Connection Created Countmeasurementthe number of connections that have been created since the datasource was last startedconnectionCreatedCount
Connection Destroyed Countmeasurementthe number of connections that have been destroyed since the datasource was last startedconnectionDestroyedCount
In Use Connection Countmeasurementthe number of connections that are currently in useinUseConnectionCount
Local TransactiontraitLocal Transactionlocal-transaction
Max Connections In Use Countmeasurementthe most connections that have been simultaneously in use since this datasource was startedmaxConnectionsInUseCount
Max SizemeasurementMax SizemaxSize
Min SizemeasurementMin SizeminSize

Note

You must use the internal name to reference Traits in Dynamic Group Definition expressions.

Configuration Properties

Table 3.104. 

NameDescriptionRequiredInternal Name
JNDI NameThe global JNDI Name under which to bind the datasource yes jndi-name
UsernameThe default username when creating a new connection. no user-name
PasswordThe default password when creating a new connection. no password
Minimum Pool SizeThe minimum number of connections the pool should hold. The default is 0. no min-pool-size
Maximum Pool SizeThe maximum number of connections the pool should hold. The default is 10. no max-pool-size
JDBC Driver ClassThe fully qualified name of the JDBC driver class (e.g. "oracle.jdbc.driver.OracleDriver"). yes driver-class
Connection URLThe JDBC URL for the database (e.g. "jdbc:oracle:thin:@host.example.com:1521:db"). To define a high availablity (HA) datasource, specify a list of URLs separated by URL delimiters (e.g. "jdbc:oracle:thin:@host1.example.com:1521:db1|jdbc:oracle:thin:@host2.example.com:1521:db2"). yes connection-url
Connection PropertiesArbitrary connection properties that should be passed to the java.sql.Driver.connect(url, props) method. no connection-properties
Allocation RetryThe number of times that allocating a connection should be tried before throwing an exception. The default is 0. no allocation-retry
Allocation Retry Wait MillisThe time in milliseconds to wait between retrying to allocate a connection. The default is 5000 (5 seconds). no allocation-retry-wait-millis
Background ValidationSpecify if connections should be validated on a background thread versus being validated prior to use. Background validation is meant to reduce the overall load on the RDBMS system when validating a connection. The default is No. no background-validation
Background Validation MillisThe interval, in milliseconds, at which the ConnectionValidator will run. Set to 0 to disable background validation. The default is 0. no background-validation-millis
Blocking Timeout in MillisecondsIndicates 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). no blocking-timeout-millis
Idle TimeoutThe maximum time, in minutes, a connection may be idle before being closed. The default is 30. no idle-timeout-minutes
Is Same RM Override ValueIf set, unconditionally sets the boolean return value of javax.transaction.xa.XAResource.isSameRM(XAResource). no isSameRM-override-value
Jmx Invoker NameThe ObjectName of the JMX Invoker MBean associated with this datasource. no jmx-invoker-name
MetadataMetadata properties. no metadata
No Tx Separate PoolsIf true, the datasource cannot reuse a connection outside a transaction once enlisted in a global transaction and vice-versa. The default is Yes. no no-tx-separate-pools
PrefillWhether to attempt to prefill the connection pool to the minimum number of connections. NOTE: Only supporting pools (OnePool) support this feature. A warning can be found in the logs if the pool does not support this. The default is No. no prefill
Security SettingsSecurity settings for connections in the pool. no security-domain
Statistics FormatterThe fully qualified class name of the class to use for formatting managed connection pool statistics for this datasource. The class must implement the org.jboss.resource.statistic.formatter.StatisticsFormatter. interface. The default is "org.jboss.resource.statistic.pool.JBossDefaultSubPoolStatisticFormatter". no statistics-formatter
Type MappingThe name of the corresponding type-mapping in conf/standardjbosscmp-jdbc.xml. The type mappings provided by default: DB2, InformixDB, MaxDB, mySQL, Oracle9i, PointBase, InterBase, Mimer SQL, McKoi, SapDB, DB2/400, SOLID, Hypersonic SQL, FirstSQL/J, MS SQLSERVER2000, MS SQLSERVER, Cloudscape, Derby, Firebird, PostgreSQL 8.0, PostgreSQL, Sybase, Ingres. Note, there may be custom type mappings defined in addition to these predefined mappings. no type-mapping
Use Java ContextIndicates whether the JNDI name should be bound under the "java" context, which causes the DataSource to only be accessible from within the JBossAS VM. The default is Yes. no use-java-context
Use Strict MinWhether idle connections below the min-pool-size should be closed. The default is No. no use-strict-min
Validate On MatchThe validate-on-match element indicates whether or not connection level validation should be done when a connection factory attempts to match a managed connection for a given set. This is typically exclusive to the use of background validation. The default is Yes. no validate-on-match
Check Valid Connection SQLThe SQL statement to use to check the validity of a pool connection. no check-valid-connection-sql
Connection DefinitionThe connection definition inside the RAR deployment uniquely identified by the connection factory interface, e.g. "javax.sql.DataSource". no connection-definition
Exception Sorter Class NameThe fully qualified name of a Java class implementing the org.jboss.resource.adapter.jdbc.ExceptionSorter interface that should be used to check if a JDBC exception should be broadcast. no exception-sorter-class-name
New Connection SQLAn SQL statement to execute whenever a new connection is added to the pool; this can be used to set the connection schema, etc. no new-connection-sql
Prepared Statement Cache SizeThe number of prepared statements per connection to be kept open and reused in subsequent requests. They are stored in an LRU cache. Set to 0 to disable the cache. The default is 0. no prepared-statement-cache-size
Query TimeoutAny configured query timeout in seconds. A value of 0 means no timeout. The default is 0. no query-timeout
Rar NameThe RAR deployment to associate with the connection manager MBean. e.g. jms-ra.rar or myapplication.ear#my.rar for nested rars. no rar-name
Set Tx Query TimeoutWhether to set the query timeout based on the time remaining until transaction timeout; any configured query timeout will be used if there is no transaction. The default is No. no set-tx-query-timeout
Share Prepared StatementsShould prepared statements be shared? The default is No. no share-prepared-statements
Stale Connection Checker Class NameFully qualified name of the Java class used to check if a connection has become stale. no stale-connection-checker-class-name
Track StatementsWhether to check for unclosed Statements and ResultSets when connections are returned to the pool. The default is "yes-no-warnings". no track-statements
Transaction IsolationThe Transaction Isolation level. The default setting is to use whichever isolation level is provided by default by the database. no transaction-isolation
Url DelimiterSpecifies the delimiter for URLs in the value of the connection-url property for HA datasources. The default is "|". no url-delimiter
Url Selector Strategy Class NameThe fully qualified class name of a Java class implementing the org.jboss.resource.adapter.jdbc.URLSelectorStrategy interface. no url-selector-strategy-class-name
Use Try LockAny configured timeout, in milliseconds, for internal locks on the resource adapter objects. A value of 0 means no timeout. The default is 0. no use-try-lock
Valid Connection Checker Class NameThe fully qualified name of a Java class implementing the org.jboss.resource.adapter.jdbc.ValidConnectionChecker whose pingDatabase method should be used to check if a connection is still valid before handing it out from the pool. no valid-connection-checker-class-name

Note

You must use the internal name to reference Configuration Properties in Dynamic Group Definition expressions.

Operations

Table 3.105. Metrics

NameDescription
FlushFlush the connections in the pool
List Formatted Sub Pool StatisticsObtain a formatted sub pool statistics report
List StatisticsObtain a statistics report
Test ConnectionTest if a connection can be obtained - returns true if a connection was obtained, or false if not; NOTE: this operation will always return a status of Successful - the results of the operation must be inspected to see whether or not a connection was obtained

Package Types

none