public static class AddDataSource.Builder extends Object
| Modifier and Type | Method and Description |
|---|---|
AddDataSource.Builder |
addConnectionProperties(Map<String,String> connectionProperties)
Adding connection properties in bulk.
|
AddDataSource.Builder |
addConnectionProperty(String name,
boolean value)
|
AddDataSource.Builder |
addConnectionProperty(String name,
String value)
Adding connection property.
|
AddDataSource.Builder |
addExceptionSorterProperty(String name,
boolean value)
Property for
exceptionSorterClass |
AddDataSource.Builder |
addExceptionSorterProperty(String name,
String value)
Property for
exceptionSorterClass |
AddDataSource.Builder |
addReauthPluginProperty(String name,
boolean value)
Property for
reauthPluginClass |
AddDataSource.Builder |
addReauthPluginProperty(String name,
String value)
Property for
reauthPluginClass |
AddDataSource.Builder |
addStaleConnectionCheckerProperty(String name,
boolean value)
Property for
staleConnectionCheckerClass |
AddDataSource.Builder |
addStaleConnectionCheckerProperty(String name,
String value)
Property for
staleConnectionCheckerClass |
AddDataSource.Builder |
addValidConnectionCheckerProperty(String name,
boolean value)
Property for
validConnectionCheckerClass |
AddDataSource.Builder |
addValidConnectionCheckerProperty(String name,
String value)
Property for
validConnectionCheckerClass |
AddDataSource.Builder |
allocationRetry(Integer allocationRetry)
The allocation retry element indicates the number of times that allocating
a connection should be tried before throwing an exception.
|
AddDataSource.Builder |
allocationRetryWaitMillis(Integer allocationRetryWaitMillis)
The allocation retry wait millis element indicates the time in milliseconds
to wait between retrying to allocate a connection
|
AddDataSource.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
|
AddDataSource.Builder |
backgroundValidation(Boolean backgroundValidation)
Connections should be validated on a background thread
(versus being validated prior to use).
|
AddDataSource.Builder |
backgroundValidationMillis(Integer backgroundValidationMillis)
Amount of time that background validation will run.
|
AddDataSource.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.
|
AddDataSource |
build() |
protected void |
check() |
AddDataSource.Builder |
checkValidConnectionSql(String checkValidConnectionSql)
SQL statement to check validity of a pool connection.
|
AddDataSource.Builder |
connectable(Boolean connectable)
Setting this to
true will let to use CMR. |
AddDataSource.Builder |
connectionUrl(String connectionUrl)
Defines the JDBC driver connection URL.
|
AddDataSource.Builder |
datasourceClass(String datasourceClass)
What datasource class will be used for connection.
|
AddDataSource.Builder |
driverClass(String driverClass)
What driver class will be used for connection.
|
AddDataSource.Builder |
driverName(String driverName)
Defines the JDBC driver the datasource should use.
|
AddDataSource.Builder |
enableAfterCreate()
Defines whether the connector should be started on startup.
|
AddDataSource.Builder |
exceptionSorterClass(String exceptionSorterClass)
org.jboss.jca.adapters.jdbc.ExceptionSorter
|
AddDataSource.Builder |
flushStrategy(PoolFlushStrategy flushStrategy)
How poool should be flushed.
|
AddDataSource.Builder |
idleTimeoutMinutes(Integer idleTimeoutMinutes)
The idle-timeout-minutes elements indicates the maximum time in minutes
a connection may be idle before being closed.
|
AddDataSource.Builder |
jndiName(String jndiName)
Specifies the JNDI name for the datasource.
|
AddDataSource.Builder |
jta(Boolean jta)
Enable JTA integration.
|
AddDataSource.Builder |
maxPoolSize(int maxPoolSize)
Specifies the maximum number of connections for a pool.
|
AddDataSource.Builder |
minPoolSize(int minPoolSize)
Specifies the minimum number of connections for a pool.
|
AddDataSource.Builder |
newConnectionSql(String newConnectionSql)
SQL statement to execute whenever a connection is added to the JCA connection pool.
|
AddDataSource.Builder |
prefill(Boolean prefill)
Whether to attempt to prefill the connection pool.
|
AddDataSource.Builder |
preparedStatementsCacheSize(Integer preparedStatementsCacheSize)
The number of prepared statements per connection in an LRU cache
|
AddDataSource.Builder |
queryTimeout(Integer queryTimeout)
Any configured query timeout in seconds.
|
AddDataSource.Builder |
reauthPluginClass(String reauthPluginClass)
Setting reauth plugin class name.
|
AddDataSource.Builder |
replaceExisting()
Specify whether to replace the existing datasource based on its name (pool-name).
|
AddDataSource.Builder |
securityDomain(String securityDomain)
Security domain name to be used for authentication to datasource.
|
AddDataSource.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.
|
AddDataSource.Builder |
sharePreparedStatements(Boolean sharePreparedStatements)
Whether to share prepare statements, i.e.
|
AddDataSource.Builder |
spy(Boolean spy)
An org.jboss.jca.adapters.jdbc.ExceptionSorter.
|
AddDataSource.Builder |
staleConnectionCheckerClass(String staleConnectionCheckerClass)
An org.jboss.jca.adapters.jdbc.StaleConnectionChecker.
|
AddDataSource.Builder |
statisticsEnabled(Boolean statisticsEnabled)
Sets whether runtime statistics are enabled or not.
|
AddDataSource.Builder |
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.
|
AddDataSource.Builder |
transactionIsolation(TransactionIsolation transactionIsolation)
Defines isolation level for connections created under this datasource.
|
AddDataSource.Builder |
urlDelimiter(String urlDelimiter)
Specifies the delimeter for URLs in connection-url for HA datasources
|
AddDataSource.Builder |
urlSelectorStrategyClass(String urlSelectorStrategyClass)
A class that implements org.jboss.jca.adapters.jdbc.URLSelectorStrategy
|
AddDataSource.Builder |
useCcm(Boolean useCcm)
Enable the use of a cached connection manager.
|
AddDataSource.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).
|
AddDataSource.Builder |
useJavaContext(Boolean useJavaContext)
Setting this to
false will bind the datasource into global JNDI. |
AddDataSource.Builder |
usernameAndPassword(String username,
String password)
Specify the user name and password used when creating a new connection.
|
AddDataSource.Builder |
useStrictMinPoolSize(Boolean useStrictMinPoolSize)
If the
minPoolSize should be considered a strictly. |
AddDataSource.Builder |
useTryLock(Integer useTryLock)
Any configured timeout for internal locks on the resource adapter
objects in seconds.
|
AddDataSource.Builder |
validateOnMatch(Boolean validateOnMatch)
Validation will be done on connection factory attempt to match
a managed connection for a given set.
|
AddDataSource.Builder |
validConnectionCheckerClass(String validConnectionCheckerClass)
An org.jboss.jca.adapters.jdbc.ValidConnectionChecker.
|
public Builder(String name)
public final AddDataSource.Builder connectionUrl(String connectionUrl)
public final AddDataSource.Builder driverName(String driverName)
public final AddDataSource.Builder jndiName(String jndiName)
public final AddDataSource.Builder driverClass(String driverClass)
public final AddDataSource.Builder 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 AddDataSource.Builder 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 AddDataSource.Builder addConnectionProperty(String name, boolean value)
public final AddDataSource.Builder addConnectionProperties(Map<String,String> connectionProperties)
addConnectionProperty(String, String).public final AddDataSource.Builder usernameAndPassword(String username, String password)
public final AddDataSource.Builder enableAfterCreate()
public final AddDataSource.Builder replaceExisting()
public final AddDataSource.Builder jta(Boolean jta)
public final AddDataSource.Builder useJavaContext(Boolean useJavaContext)
false will bind the datasource into global JNDI.public final AddDataSource.Builder connectable(Boolean connectable)
true will let to use CMR.public final AddDataSource.Builder maxPoolSize(int maxPoolSize)
public final AddDataSource.Builder minPoolSize(int minPoolSize)
public final AddDataSource.Builder statisticsEnabled(Boolean statisticsEnabled)
public final AddDataSource.Builder useCcm(Boolean useCcm)
public final AddDataSource.Builder newConnectionSql(String newConnectionSql)
public final AddDataSource.Builder transactionIsolation(TransactionIsolation transactionIsolation)
public final AddDataSource.Builder urlDelimiter(String urlDelimiter)
public final AddDataSource.Builder urlSelectorStrategyClass(String urlSelectorStrategyClass)
public final AddDataSource.Builder prefill(Boolean prefill)
public final AddDataSource.Builder securityDomain(String securityDomain)
public final AddDataSource.Builder reauthPluginClass(String reauthPluginClass)
public final AddDataSource.Builder addReauthPluginProperty(String name, String value)
reauthPluginClasspublic final AddDataSource.Builder addReauthPluginProperty(String name, boolean value)
reauthPluginClasspublic final AddDataSource.Builder useStrictMinPoolSize(Boolean useStrictMinPoolSize)
minPoolSize should be considered a strictly.public final AddDataSource.Builder flushStrategy(PoolFlushStrategy flushStrategy)
PoolFlushStrategy.public final AddDataSource.Builder checkValidConnectionSql(String checkValidConnectionSql)
public final AddDataSource.Builder validateOnMatch(Boolean validateOnMatch)
Typically exclusive to use of backgroundValidation.
public final AddDataSource.Builder backgroundValidation(Boolean backgroundValidation)
Typically exclusive to use of validateOnMatch.
public final AddDataSource.Builder backgroundValidationMillis(Integer backgroundValidationMillis)
public final AddDataSource.Builder useFastFailAllocation(Boolean useFastFailAllocation)
public final AddDataSource.Builder staleConnectionCheckerClass(String staleConnectionCheckerClass)
public final AddDataSource.Builder addStaleConnectionCheckerProperty(String name, String value)
staleConnectionCheckerClasspublic final AddDataSource.Builder addStaleConnectionCheckerProperty(String name, boolean value)
staleConnectionCheckerClasspublic final AddDataSource.Builder validConnectionCheckerClass(String validConnectionCheckerClass)
public final AddDataSource.Builder addValidConnectionCheckerProperty(String name, String value)
validConnectionCheckerClasspublic final AddDataSource.Builder addValidConnectionCheckerProperty(String name, boolean value)
validConnectionCheckerClasspublic final AddDataSource.Builder exceptionSorterClass(String exceptionSorterClass)
public final AddDataSource.Builder addExceptionSorterProperty(String name, String value)
exceptionSorterClasspublic final AddDataSource.Builder addExceptionSorterProperty(String name, boolean value)
exceptionSorterClasspublic final AddDataSource.Builder spy(Boolean spy)
public final AddDataSource.Builder blockingTimeoutWaitMillis(Integer blockingTimeoutWaitMillis)
public final AddDataSource.Builder idleTimeoutMinutes(Integer idleTimeoutMinutes)
public final AddDataSource.Builder setTxQueryTimeout(Boolean setTxQueryTimeout)
public final AddDataSource.Builder allowMultipleUsers(Boolean allowMultipleUsers)
public final AddDataSource.Builder queryTimeout(Integer queryTimeout)
public final AddDataSource.Builder useTryLock(Integer useTryLock)
public final AddDataSource.Builder allocationRetry(Integer allocationRetry)
public final AddDataSource.Builder allocationRetryWaitMillis(Integer allocationRetryWaitMillis)
public final AddDataSource.Builder trackPreparedStatements(TrackStatementType trackStatements)
public final AddDataSource.Builder sharePreparedStatements(Boolean sharePreparedStatements)
public final AddDataSource.Builder preparedStatementsCacheSize(Integer preparedStatementsCacheSize)
public AddDataSource build()
protected final void check()
Copyright © 2015. All rights reserved.