public static class AddDataSource.Builder<THIS extends AddDataSource.Builder> extends Object
THIS type parameter is only meant
to be used by subclasses. If you're not inheriting from this class, don't use it.| Modifier and Type | Method and Description |
|---|---|
THIS |
addConnectionProperties(Map<String,String> connectionProperties)
Adding connection properties in bulk.
|
THIS |
addConnectionProperty(String name,
boolean value)
|
THIS |
addConnectionProperty(String name,
String value)
Adding connection property.
|
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 |
THIS |
addReauthPluginProperty(String name,
String value)
Property for
reauthPluginClass |
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 |
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.
|
AddDataSource |
build() |
protected void |
check() |
THIS |
checkValidConnectionSql(String checkValidConnectionSql)
SQL statement to check validity of a pool connection.
|
THIS |
connectable(Boolean connectable)
Setting this to
true will let to use CMR. |
THIS |
connectionUrl(String connectionUrl)
Defines the JDBC driver connection URL.
|
THIS |
datasourceClass(String datasourceClass)
What datasource class will be used for connection.
|
THIS |
driverClass(String driverClass)
What driver class will be used for 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 |
jndiName(String jndiName)
Specifies the JNDI name for the datasource.
|
THIS |
jta(Boolean jta)
Enable JTA integration.
|
THIS |
managedConnectionPool(String managedConnectionPool)
Defines the ManagedConnectionPool implementation,
f.ex.
|
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 |
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 |
replaceExisting()
Specify whether to replace the existing datasource based on its name (pool-name).
|
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 trackStatements)
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.
|
public Builder(String name)
public final THIS connectionUrl(String connectionUrl)
public final THIS driverName(String driverName)
public final THIS driverClass(String driverClass)
public final THIS datasourceClass(String datasourceClass)
Datasource class has to be defined as fully qualified datasource class name of jdbc driver.
By default driver class is used for establishing connection but you can enforce the datasource class would be use. If you use datasource you will probably needs to define connection properties as well.
public final THIS addConnectionProperty(String name, String value)
When datasource class is defined, then JCA injects these properties by calling setters based on property
name (i.e., if connection property name is user, then JCA calls Datasource.setUser(value)).
When driver class is defined, these properties are passed
to Driver.
public final THIS addConnectionProperties(Map<String,String> connectionProperties)
addConnectionProperty(String, String).public final THIS usernameAndPassword(String username, String password)
public final THIS enableAfterCreate()
public final THIS replaceExisting()
public final THIS useJavaContext(Boolean useJavaContext)
false will bind the datasource into global JNDI.public final THIS connectable(Boolean connectable)
true will let to use CMR.public final THIS maxPoolSize(int maxPoolSize)
public final THIS minPoolSize(int minPoolSize)
public final THIS statisticsEnabled(Boolean statisticsEnabled)
public final THIS newConnectionSql(String newConnectionSql)
public final THIS transactionIsolation(TransactionIsolation transactionIsolation)
public final THIS urlDelimiter(String urlDelimiter)
public final THIS urlSelectorStrategyClass(String urlSelectorStrategyClass)
public final THIS prefill(Boolean prefill)
public final THIS securityDomain(String securityDomain)
public final THIS reauthPluginClass(String reauthPluginClass)
public final THIS addReauthPluginProperty(String name, String value)
reauthPluginClasspublic final THIS addReauthPluginProperty(String name, boolean value)
reauthPluginClasspublic final THIS useStrictMinPoolSize(Boolean useStrictMinPoolSize)
minPoolSize should be considered a strictly.public final THIS flushStrategy(PoolFlushStrategy flushStrategy)
PoolFlushStrategy.public final THIS checkValidConnectionSql(String checkValidConnectionSql)
public final THIS validateOnMatch(Boolean validateOnMatch)
Typically exclusive to use of backgroundValidation.
public final THIS backgroundValidation(Boolean backgroundValidation)
Typically exclusive to use of validateOnMatch.
public final THIS backgroundValidationMillis(Integer backgroundValidationMillis)
public final THIS useFastFailAllocation(Boolean useFastFailAllocation)
public final THIS staleConnectionCheckerClass(String staleConnectionCheckerClass)
public final THIS addStaleConnectionCheckerProperty(String name, String value)
staleConnectionCheckerClasspublic final THIS addStaleConnectionCheckerProperty(String name, boolean value)
staleConnectionCheckerClasspublic final THIS validConnectionCheckerClass(String validConnectionCheckerClass)
public final THIS addValidConnectionCheckerProperty(String name, String value)
validConnectionCheckerClasspublic final THIS addValidConnectionCheckerProperty(String name, boolean value)
validConnectionCheckerClasspublic final THIS exceptionSorterClass(String exceptionSorterClass)
public final THIS addExceptionSorterProperty(String name, String value)
exceptionSorterClasspublic final THIS addExceptionSorterProperty(String name, boolean value)
exceptionSorterClasspublic final THIS blockingTimeoutWaitMillis(Integer blockingTimeoutWaitMillis)
public final THIS idleTimeoutMinutes(Integer idleTimeoutMinutes)
public final THIS setTxQueryTimeout(Boolean setTxQueryTimeout)
public final THIS allowMultipleUsers(Boolean allowMultipleUsers)
public final THIS queryTimeout(Integer queryTimeout)
public final THIS useTryLock(Integer useTryLock)
public final THIS allocationRetry(Integer allocationRetry)
public final THIS allocationRetryWaitMillis(Integer allocationRetryWaitMillis)
public final THIS trackPreparedStatements(TrackStatementType trackStatements)
public final THIS sharePreparedStatements(Boolean sharePreparedStatements)
public final THIS preparedStatementsCacheSize(Integer preparedStatementsCacheSize)
public final THIS managedConnectionPool(String managedConnectionPool)
public AddDataSource build()
protected final void check()
Copyright © 2024. All rights reserved.