org.wildfly.extras.creaper.commands.datasources
Class AddXADataSource.Builder<THIS extends AddXADataSource.Builder>

java.lang.Object
  extended by org.wildfly.extras.creaper.commands.datasources.AddXADataSource.Builder<THIS>
Direct Known Subclasses:
AddDb2XADataSource.Builder, AddMariaDbXADataSource.Builder, AddMssqlXADataSource.Builder, AddMysqlXADataSource.Builder, AddOracleXADataSource.Builder, AddPostgresPlusXADataSource.Builder, AddPostgreSqlXADataSource.Builder, AddSybaseXADataSource.Builder
Enclosing class:
AddXADataSource

public static class AddXADataSource.Builder<THIS extends AddXADataSource.Builder>
extends Object

Builder for configuration attributes of an XA datasource. The THIS type parameter is only meant to be used by subclasses. If you're not inheriting from this class, don't use it.

See Also:
http://wildscribe.github.io/JBoss%20EAP/6.2.0/subsystem/datasources/xa-data-source/

Constructor Summary
AddXADataSource.Builder(String name)
           
 
Method Summary
 THIS addExceptionSorterProperty(String name, boolean value)
          Property for exceptionSorterClass
 THIS addExceptionSorterProperty(String name, String value)
          Property for exceptionSorterClass
 THIS addReauthPluginProperty(String name, boolean value)
          Property for reauthPluginClass(String)
 THIS addReauthPluginProperty(String name, String value)
          Property for reauthPluginClass(String)
 THIS addRecoveryPluginProperty(String name, boolean value)
          Property for recoveryPluginClass(String)
 THIS addRecoveryPluginProperty(String name, String value)
          Property for recoveryPluginClass(String)
 THIS addStaleConnectionCheckerProperty(String name, boolean value)
          Property for staleConnectionCheckerClass
 THIS addStaleConnectionCheckerProperty(String name, String value)
          Property for staleConnectionCheckerClass
 THIS addValidConnectionCheckerProperty(String name, boolean value)
          Property for validConnectionCheckerClass
 THIS addValidConnectionCheckerProperty(String name, String value)
          Property for validConnectionCheckerClass
 THIS addXaDatasourceProperties(Map<String,String> xaDatasourceProperties)
          Adds set of xa-data-source properties defined for XADataSource implementation class.
 THIS addXaDatasourceProperty(String name, boolean value)
          Adds xa-data-source property defined for XADataSource implementation class.
 THIS addXaDatasourceProperty(String name, String value)
          Adds xa-data-source property defined for XADataSource implementation class.
 THIS allocationRetry(Integer allocationRetry)
          The allocation retry element indicates the number of times that allocating a connection should be tried before throwing an exception.
 THIS allocationRetryWaitMillis(Integer allocationRetryWaitMillis)
          The allocation retry wait millis element indicates the time in milliseconds to wait between retrying to allocate a connection
 THIS allowMultipleUsers(Boolean allowMultipleUsers)
          Specifies if multiple users will access the datasource through the getConnection(user, password) method and hence if the internal pool type should account for that
 THIS backgroundValidation(Boolean backgroundValidation)
          Connections should be validated on a background thread (versus being validated prior to use).
 THIS backgroundValidationMillis(Integer backgroundValidationMillis)
          Amount of time that background validation will run.
 THIS blockingTimeoutWaitMillis(Integer blockingTimeoutWaitMillis)
          The blocking-timeout-millis element indicates the maximum time in milliseconds to block while waiting for a connection before throwing an exception.
 AddXADataSource build()
           
protected  void check()
           
 THIS checkValidConnectionSql(String checkValidConnectionSql)
          SQL statement to check validity of a pool connection.
 THIS driverName(String driverName)
          Defines the JDBC driver the datasource should use.
 THIS enableAfterCreate()
          Defines whether the connector should be started on startup.
 THIS exceptionSorterClass(String exceptionSorterClass)
          org.jboss.jca.adapters.jdbc.ExceptionSorter
 THIS flushStrategy(PoolFlushStrategy flushStrategy)
          How poool should be flushed.
 THIS idleTimeoutMinutes(Integer idleTimeoutMinutes)
          The idle-timeout-minutes elements indicates the maximum time in minutes a connection may be idle before being closed.
 THIS interleaving(boolean interleaving)
          An element to enable interleaving for XA connection factories
 THIS jndiName(String jndiName)
          Specifies the JNDI name for the datasource.
 THIS managedConnectionPool(String mcp)
           
 THIS maxPoolSize(int maxPoolSize)
          Specifies the maximum number of connections for a pool.
 THIS minPoolSize(int minPoolSize)
          Specifies the minimum number of connections for a pool.
 THIS newConnectionSql(String newConnectionSql)
          SQL statement to execute whenever a connection is added to the JCA connection pool.
 THIS noRecovery(Boolean noRecovery)
          Specify if the xa-datasource should be excluded from recovery.
 THIS noTxSeparatePool(Boolean noTxSeparatePool)
          Oracle does not like XA connections getting used both inside and outside a JTA transaction.
 THIS padXid(Boolean padXid)
          Should the Xid be padded
 THIS prefill(Boolean prefill)
          Whether to attempt to prefill the connection pool.
 THIS preparedStatementsCacheSize(Integer preparedStatementsCacheSize)
          The number of prepared statements per connection in an LRU cache
 THIS queryTimeout(Integer queryTimeout)
          Any configured query timeout in seconds.
 THIS reauthPluginClass(String reauthPluginClass)
          Setting reauth plugin class name.
 THIS recoveryPluginClass(String recoveryPluginClass)
          Setting plugin class name for recovery extension plugin used in spi (core.spi.xa).
 THIS recoverySecurityDomain(String securityDomain)
          Security domain name to be used for authentication to datasource during recovery.
 THIS recoveryUsernameAndPassword(String username, String password)
          Specify the user name and password used when creating a new connection during recovery.
 THIS replaceExisting()
          If xa datasource with the given pool-name exists it will be replaced with this newly created datasource.
 THIS sameRmOverride(Boolean isSameRmOverride)
          The is-same-rm-override element allows one to unconditionally set whether the javax.transaction.xa.XAResource.isSameRM(XAResource) returns true or false.
 THIS securityDomain(String securityDomain)
          Security domain name to be used for authentication to datasource.
 THIS setTxQueryTimeout(Boolean setTxQueryTimeout)
          Whether 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.
 THIS sharePreparedStatements(Boolean sharePreparedStatements)
          Whether to share prepare statements, i.e.
 THIS spy(Boolean spy)
          An org.jboss.jca.adapters.jdbc.ExceptionSorter.
 THIS staleConnectionCheckerClass(String staleConnectionCheckerClass)
          An org.jboss.jca.adapters.jdbc.StaleConnectionChecker.
 THIS statisticsEnabled(Boolean statisticsEnabled)
          Sets whether runtime statistics are enabled or not.
 THIS trackPreparedStatements(TrackStatementType trackPreparedStatements)
          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.
 THIS transactionIsolation(TransactionIsolation transactionIsolation)
          Defines isolation level for connections created under this datasource.
 THIS urlDelimiter(String urlDelimiter)
          Specifies the delimeter for URLs in connection-url for HA datasources
 THIS urlSelectorStrategyClass(String urlSelectorStrategyClass)
          A class that implements org.jboss.jca.adapters.jdbc.URLSelectorStrategy
 THIS useCcm(Boolean useCcm)
          Enable the use of a cached connection manager.
 THIS useFastFailAllocation(Boolean useFastFailAllocation)
          Whether fail a connection allocation on the first connection if it is invalid (true) or keep trying until the pool is exhausted of all potential connections (false).
 THIS useJavaContext(Boolean useJavaContext)
          Setting this to false will bind the datasource into global JNDI.
 THIS usernameAndPassword(String username, String password)
          Specify the user name and password used when creating a new connection.
 THIS useStrictMinPoolSize(Boolean useStrictMinPoolSize)
          If the minPoolSize should be considered a strictly.
 THIS useTryLock(Integer useTryLock)
          Any configured timeout for internal locks on the resource adapter objects in seconds.
 THIS validateOnMatch(Boolean validateOnMatch)
          Validation will be done on connection factory attempt to match a managed connection for a given set.
 THIS validConnectionCheckerClass(String validConnectionCheckerClass)
          An org.jboss.jca.adapters.jdbc.ValidConnectionChecker.
 THIS wrapXaResource(Boolean wrapXaResource)
          Should the XAResource instances be wrapped in a org.jboss.tm.XAResourceWrapper instance.
 THIS xaDatasourceClass(String xaDatasourceClass)
          The fully qualified name of the javax.sql.XADataSource implementation.
 THIS xaResourceTimeout(Integer xaResourceTimeout)
          Passed to XAResource.setTransactionTimeout().
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AddXADataSource.Builder

public AddXADataSource.Builder(String name)
Method Detail

driverName

public final THIS driverName(String driverName)
Defines the JDBC driver the datasource should use. It is a symbolic name matching the the name of installed driver. In case the driver is deployed as jar, the name is the name of deployment unit.


jndiName

public final THIS jndiName(String jndiName)
Specifies the JNDI name for the datasource.


usernameAndPassword

public final THIS usernameAndPassword(String username,
                                      String password)
Specify the user name and password used when creating a new connection.


enableAfterCreate

public final THIS enableAfterCreate()
Defines whether the connector should be started on startup.


replaceExisting

public final THIS replaceExisting()
If xa datasource with the given pool-name exists it will be replaced with this newly created datasource. Note that when enabled, this can cause server reload!


xaDatasourceClass

public final THIS xaDatasourceClass(String xaDatasourceClass)
The fully qualified name of the javax.sql.XADataSource implementation.


maxPoolSize

public final THIS maxPoolSize(int maxPoolSize)
Specifies the maximum number of connections for a pool. No more connections will be created in each sub-pool.


minPoolSize

public final THIS minPoolSize(int minPoolSize)
Specifies the minimum number of connections for a pool.


addXaDatasourceProperty

public final THIS addXaDatasourceProperty(String name,
                                          String value)
Adds xa-data-source property defined for XADataSource implementation class.


addXaDatasourceProperty

public final THIS addXaDatasourceProperty(String name,
                                          boolean value)
Adds xa-data-source property defined for XADataSource implementation class.


addXaDatasourceProperties

public final THIS addXaDatasourceProperties(Map<String,String> xaDatasourceProperties)
Adds set of xa-data-source properties defined for XADataSource implementation class.


allocationRetry

public final THIS allocationRetry(Integer allocationRetry)
The allocation retry element indicates the number of times that allocating a connection should be tried before throwing an exception.


allowMultipleUsers

public final THIS allowMultipleUsers(Boolean allowMultipleUsers)
Specifies if multiple users will access the datasource through the getConnection(user, password) method and hence if the internal pool type should account for that


allocationRetryWaitMillis

public final THIS allocationRetryWaitMillis(Integer allocationRetryWaitMillis)
The allocation retry wait millis element indicates the time in milliseconds to wait between retrying to allocate a connection


backgroundValidation

public final THIS backgroundValidation(Boolean backgroundValidation)
Connections should be validated on a background thread (versus being validated prior to use).

Typically exclusive to use of validateOnMatch.


backgroundValidationMillis

public final THIS backgroundValidationMillis(Integer backgroundValidationMillis)
Amount of time that background validation will run.


blockingTimeoutWaitMillis

public final THIS blockingTimeoutWaitMillis(Integer blockingTimeoutWaitMillis)
The blocking-timeout-millis element indicates the maximum time in milliseconds to block while waiting for a connection before throwing an exception.


checkValidConnectionSql

public final THIS checkValidConnectionSql(String checkValidConnectionSql)
SQL statement to check validity of a pool connection. May be used when connection is taken from pool to use.


exceptionSorterClass

public final THIS exceptionSorterClass(String exceptionSorterClass)
org.jboss.jca.adapters.jdbc.ExceptionSorter


addExceptionSorterProperty

public final THIS addExceptionSorterProperty(String name,
                                             String value)
Property for exceptionSorterClass


addExceptionSorterProperty

public final THIS addExceptionSorterProperty(String name,
                                             boolean value)
Property for exceptionSorterClass


flushStrategy

public final THIS flushStrategy(PoolFlushStrategy flushStrategy)
How poool should be flushed. There is predefined strategies by JCA. See PoolFlushStrategy.


idleTimeoutMinutes

public final THIS idleTimeoutMinutes(Integer idleTimeoutMinutes)
The idle-timeout-minutes elements indicates the maximum time in minutes a connection may be idle before being closed.


interleaving

public final THIS interleaving(boolean interleaving)
An element to enable interleaving for XA connection factories


managedConnectionPool

public final THIS managedConnectionPool(String mcp)

newConnectionSql

public final THIS newConnectionSql(String newConnectionSql)
SQL statement to execute whenever a connection is added to the JCA connection pool.


noRecovery

public final THIS noRecovery(Boolean noRecovery)
Specify if the xa-datasource should be excluded from recovery.


noTxSeparatePool

public final THIS noTxSeparatePool(Boolean noTxSeparatePool)
Oracle does not like XA connections getting used both inside and outside a JTA transaction. To workaround the problem you can create separate sub-pools for the different contexts


padXid

public final THIS padXid(Boolean padXid)
Should the Xid be padded


prefill

public final THIS prefill(Boolean prefill)
Whether to attempt to prefill the connection pool.


useStrictMinPoolSize

public final THIS useStrictMinPoolSize(Boolean useStrictMinPoolSize)
If the minPoolSize should be considered a strictly.


preparedStatementsCacheSize

public final THIS preparedStatementsCacheSize(Integer preparedStatementsCacheSize)
The number of prepared statements per connection in an LRU cache


queryTimeout

public final THIS queryTimeout(Integer queryTimeout)
Any configured query timeout in seconds.


reauthPluginClass

public final THIS reauthPluginClass(String reauthPluginClass)
Setting reauth plugin class name.


addReauthPluginProperty

public final THIS addReauthPluginProperty(String name,
                                          String value)
Property for reauthPluginClass(String)


addReauthPluginProperty

public final THIS addReauthPluginProperty(String name,
                                          boolean value)
Property for reauthPluginClass(String)


recoveryUsernameAndPassword

public final THIS recoveryUsernameAndPassword(String username,
                                              String password)
Specify the user name and password used when creating a new connection during recovery.


recoveryPluginClass

public final THIS recoveryPluginClass(String recoveryPluginClass)
Setting plugin class name for recovery extension plugin used in spi (core.spi.xa).


addRecoveryPluginProperty

public final THIS addRecoveryPluginProperty(String name,
                                            String value)
Property for recoveryPluginClass(String)


addRecoveryPluginProperty

public final THIS addRecoveryPluginProperty(String name,
                                            boolean value)
Property for recoveryPluginClass(String)


recoverySecurityDomain

public final THIS recoverySecurityDomain(String securityDomain)
Security domain name to be used for authentication to datasource during recovery.


sameRmOverride

public final THIS sameRmOverride(Boolean isSameRmOverride)
The is-same-rm-override element allows one to unconditionally set whether the javax.transaction.xa.XAResource.isSameRM(XAResource) returns true or false.


securityDomain

public final THIS securityDomain(String securityDomain)
Security domain name to be used for authentication to datasource.


setTxQueryTimeout

public final THIS setTxQueryTimeout(Boolean setTxQueryTimeout)
Whether 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.


sharePreparedStatements

public final THIS sharePreparedStatements(Boolean sharePreparedStatements)
Whether to share prepare statements, i.e. whether asking for same statement twice without closing uses the same underlying prepared statement.


spy

public final THIS spy(Boolean spy)
An org.jboss.jca.adapters.jdbc.ExceptionSorter.


staleConnectionCheckerClass

public final THIS staleConnectionCheckerClass(String staleConnectionCheckerClass)
An org.jboss.jca.adapters.jdbc.StaleConnectionChecker.


addStaleConnectionCheckerProperty

public final THIS addStaleConnectionCheckerProperty(String name,
                                                    String value)
Property for staleConnectionCheckerClass


addStaleConnectionCheckerProperty

public final THIS addStaleConnectionCheckerProperty(String name,
                                                    boolean value)
Property for staleConnectionCheckerClass


statisticsEnabled

public final THIS statisticsEnabled(Boolean statisticsEnabled)
Sets whether runtime statistics are enabled or not.


trackPreparedStatements

public final THIS trackPreparedStatements(TrackStatementType trackPreparedStatements)
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.


transactionIsolation

public final THIS transactionIsolation(TransactionIsolation transactionIsolation)
Defines isolation level for connections created under this datasource.


urlDelimiter

public final THIS urlDelimiter(String urlDelimiter)
Specifies the delimeter for URLs in connection-url for HA datasources


urlSelectorStrategyClass

public final THIS urlSelectorStrategyClass(String urlSelectorStrategyClass)
A class that implements org.jboss.jca.adapters.jdbc.URLSelectorStrategy


useCcm

public final THIS useCcm(Boolean useCcm)
Enable the use of a cached connection manager.


useFastFailAllocation

public final THIS useFastFailAllocation(Boolean useFastFailAllocation)
Whether fail a connection allocation on the first connection if it is invalid (true) or keep trying until the pool is exhausted of all potential connections (false).


useJavaContext

public final THIS useJavaContext(Boolean useJavaContext)
Setting this to false will bind the datasource into global JNDI.


useTryLock

public final THIS useTryLock(Integer useTryLock)
Any configured timeout for internal locks on the resource adapter objects in seconds.


validConnectionCheckerClass

public final THIS validConnectionCheckerClass(String validConnectionCheckerClass)
An org.jboss.jca.adapters.jdbc.ValidConnectionChecker.


addValidConnectionCheckerProperty

public final THIS addValidConnectionCheckerProperty(String name,
                                                    String value)
Property for validConnectionCheckerClass


addValidConnectionCheckerProperty

public final THIS addValidConnectionCheckerProperty(String name,
                                                    boolean value)
Property for validConnectionCheckerClass


validateOnMatch

public final THIS validateOnMatch(Boolean validateOnMatch)
Validation will be done on connection factory attempt to match a managed connection for a given set.

Typically exclusive to use of backgroundValidation.


wrapXaResource

public final THIS wrapXaResource(Boolean wrapXaResource)
Should the XAResource instances be wrapped in a org.jboss.tm.XAResourceWrapper instance.


xaResourceTimeout

public final THIS xaResourceTimeout(Integer xaResourceTimeout)
Passed to XAResource.setTransactionTimeout(). Default is zero which does not invoke the setter. In seconds.


build

public AddXADataSource build()

check

protected final void check()


Copyright © 2016. All rights reserved.