org.wildfly.extras.creaper.commands.datasources
Class AddXADataSource.Builder

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

public static class AddXADataSource.Builder
extends Object

Builder for configuration attributes of an XA datasource.

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

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


usernameAndPassword

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


enableAfterCreate

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


replaceExisting

public final AddXADataSource.Builder replaceExisting()
If xa datasource with the given pool-name exists it will be replaced with this newly created datasource.


xaDatasourceClass

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


maxPoolSize

public final AddXADataSource.Builder 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 AddXADataSource.Builder minPoolSize(int minPoolSize)
Specifies the minimum number of connections for a pool.


addXaDatasourceProperty

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


addXaDatasourceProperty

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


addXaDatasourceProperties

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


allocationRetry

public final AddXADataSource.Builder 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 AddXADataSource.Builder 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 AddXADataSource.Builder 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 AddXADataSource.Builder 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 AddXADataSource.Builder backgroundValidationMillis(Integer backgroundValidationMillis)
Amount of time that background validation will run.


blockingTimeoutWaitMillis

public final AddXADataSource.Builder 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 AddXADataSource.Builder 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 AddXADataSource.Builder exceptionSorterClass(String exceptionSorterClass)
org.jboss.jca.adapters.jdbc.ExceptionSorter


addExceptionSorterProperty

public final AddXADataSource.Builder addExceptionSorterProperty(String name,
                                                                String value)
Property for exceptionSorterClass


addExceptionSorterProperty

public final AddXADataSource.Builder addExceptionSorterProperty(String name,
                                                                boolean value)
Property for exceptionSorterClass


flushStrategy

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


idleTimeoutMinutes

public final AddXADataSource.Builder 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 AddXADataSource.Builder interleaving(boolean interleaving)
An element to enable interleaving for XA connection factories


newConnectionSql

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


noRecovery

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


noTxSeparatePool

public final AddXADataSource.Builder 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 AddXADataSource.Builder padXid(Boolean padXid)
Should the Xid be padded


prefill

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


useStrictMinPoolSize

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


preparedStatementsCacheSize

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


queryTimeout

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


reauthPluginClass

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


addReauthPluginProperty

public final AddXADataSource.Builder addReauthPluginProperty(String name,
                                                             String value)
Property for reauthPluginClass(String)


addReauthPluginProperty

public final AddXADataSource.Builder addReauthPluginProperty(String name,
                                                             boolean value)
Property for reauthPluginClass(String)


recoveryUsernameAndPassword

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


recoveryPluginClass

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


addRecoveryPluginProperty

public final AddXADataSource.Builder addRecoveryPluginProperty(String name,
                                                               String value)
Property for recoveryPluginClass(String)


addRecoveryPluginProperty

public final AddXADataSource.Builder addRecoveryPluginProperty(String name,
                                                               boolean value)
Property for recoveryPluginClass(String)


recoverySecurityDomain

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


sameRmOverride

public final AddXADataSource.Builder 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 AddXADataSource.Builder securityDomain(String securityDomain)
Security domain name to be used for authentication to datasource.


setTxQueryTimeout

public final AddXADataSource.Builder 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 AddXADataSource.Builder 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 AddXADataSource.Builder spy(Boolean spy)
An org.jboss.jca.adapters.jdbc.ExceptionSorter.


staleConnectionCheckerClass

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


addStaleConnectionCheckerProperty

public final AddXADataSource.Builder addStaleConnectionCheckerProperty(String name,
                                                                       String value)
Property for staleConnectionCheckerClass


addStaleConnectionCheckerProperty

public final AddXADataSource.Builder addStaleConnectionCheckerProperty(String name,
                                                                       boolean value)
Property for staleConnectionCheckerClass


statisticsEnabled

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


trackPreparedStatements

public final AddXADataSource.Builder 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 AddXADataSource.Builder transactionIsolation(TransactionIsolation transactionIsolation)
Defines isolation level for connections created under this datasource.


urlDelimiter

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


urlSelectorStrategyClass

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


useCcm

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


useFastFailAllocation

public final AddXADataSource.Builder 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 AddXADataSource.Builder useJavaContext(Boolean useJavaContext)
Setting this to false will bind the datasource into global JNDI.


useTryLock

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


validConnectionCheckerClass

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


addValidConnectionCheckerProperty

public final AddXADataSource.Builder addValidConnectionCheckerProperty(String name,
                                                                       String value)
Property for validConnectionCheckerClass


addValidConnectionCheckerProperty

public final AddXADataSource.Builder addValidConnectionCheckerProperty(String name,
                                                                       boolean value)
Property for validConnectionCheckerClass


validateOnMatch

public final AddXADataSource.Builder 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 AddXADataSource.Builder wrapXaResource(Boolean wrapXaResource)
Should the XAResource instances be wrapped in a org.jboss.tm.XAResourceWrapper instance.


xaResourceTimeout

public final AddXADataSource.Builder 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 © 2015. All rights reserved.