Package org.jboss.jca.as.converters
Class LegacyTxDataSourceImpl
- java.lang.Object
-
- org.jboss.jca.as.converters.LegacyTxDataSourceImpl
-
- All Implemented Interfaces:
ConnectionFactory,DataSource,LocalTxDataSource,NoTxDataSource
public class LegacyTxDataSourceImpl extends Object implements LocalTxDataSource
A XaDataSource impl.- Version:
- $Revision: $
- Author:
- Jeff Zhang
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.jboss.jca.as.converters.LocalTxDataSource
LocalTxDataSource.Tag
-
-
Constructor Summary
Constructors Constructor Description LegacyTxDataSourceImpl(String connectionUrl, String driverClass, String dataSourceClass, String driver, TransactionIsolation transactionIsolation, Map<String,String> connectionProperties)create a LegacyTxDataSourceImpl
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LegacyTxDataSourceImplbuildCommonPool(Integer minPoolSize, Integer initialPoolSize, Integer maxPoolSize, Boolean prefill, Boolean useStrictMin, FlushStrategy flushStrategy)build pool partvoidbuildDataSourceImpl()buildDataSourceImplLegacyTxDataSourceImplbuildDsSecurity(String userName, String password, String securityDomain, Extension reauthPlugin)build security partLegacyTxDataSourceImplbuildOther(String urlDelimiter, String urlSelectorStrategyClassName, String newConnectionSql, Boolean useJavaContext, String poolName, Boolean enabled, String jndiName, Boolean spy, Boolean useCcm, Boolean jta)build other propertiesLegacyTxDataSourceImplbuildStatement(Boolean sharePreparedStatements, Long preparedStatementsCacheSize, Statement.TrackStatementsEnum trackStatements)build statement partLegacyTxDataSourceImplbuildTimeOut(Long blockingTimeoutMillis, Long idleTimeoutMinutes, Integer allocationRetry, Long allocationRetryWaitMillis, Integer xaResourceTimeout, Boolean setTxQueryTimeout, Long queryTimeout, Long useTryLock)build timeout partLegacyTxDataSourceImplbuildValidation(Boolean backgroundValidation, Long backgroundValidationMillis, Boolean useFastFail, Extension validConnectionChecker, String checkValidConnectionSql, Boolean validateOnMatch, Extension staleConnectionChecker, Extension exceptionSorter)build validation partIntegergetAllocationRetry()Get the allocationRetryWaitMillis.LonggetAllocationRetryWaitMillis()Get the allocationRetryWaitMillis.LonggetBackgroundValidationMillis()Get the backgroundValidationMillis.LonggetBlockingTimeoutMillis()Get the blockingTimeoutMillis.StringgetCheckValidConnectionSql()Get the checkValidConnectionSql.Map<String,String>getConnectionProperties()Get the connectionProperties.StringgetConnectionUrl()Get the connectionUrl.StringgetDriverClass()Get the driverClass.ExtensiongetExceptionSorter()Get the exceptionSorterLonggetIdleTimeoutMinutes()Get the idleTimeoutMinutes.StringgetJndiName()Get the jndiName.IntegergetMaxPoolSize()Get the maxPoolSize.IntegergetMinPoolSize()Get the minPoolSize.StringgetNewConnectionSql()Get the newConnectionSql.StringgetPassword()Get the password.LonggetPreparedStatementsCacheSize()Get the preparedStatementsCacheSize.LonggetQueryTimeout()Get the queryTimeout.StringgetSecurityDomain()get the security domain for pure security-domain security managementExtensiongetStaleConnectionChecker()Get the staleConnectionCheckerStatement.TrackStatementsEnumgetTrackStatements()Get the trackStatements.TransactionIsolationgetTransactionIsolation()Get the transactionIsolation.StringgetUrlDelimiter()Get the urlDelimiter.StringgetUrlSelectorStrategyClassName()Get the urlSelectorStrategyClassName.StringgetUserName()Get the userName.LonggetUseTryLock()Get the useTryLock.ExtensiongetValidConnectionChecker()Get the validConnectionCheckerBooleanisBackgroundValidation()Get the backgroundValidation.booleanisNoTxSeparatePools()isNoTxSeparatePoolsBooleanisPrefill()Get the prefill.BooleanisSetTxQueryTimeout()Get the setTxQuertTimeout.BooleanisSharePreparedStatements()Get the sharePreparedStatements.BooleanisUseFastFail()Get the useFastFail.BooleanisUseJavaContext()Get the useJavaContext.BooleanisValidateOnMatch()Get the validateOnMatch.StringtoString()
-
-
-
Constructor Detail
-
LegacyTxDataSourceImpl
public LegacyTxDataSourceImpl(String connectionUrl, String driverClass, String dataSourceClass, String driver, TransactionIsolation transactionIsolation, Map<String,String> connectionProperties)
create a LegacyTxDataSourceImpl- Parameters:
connectionUrl- connectionUrldriverClass- driverClassdataSourceClass- dataSourceClassdriver- drivertransactionIsolation- transactionIsolationconnectionProperties- connectionProperties
-
-
Method Detail
-
buildDataSourceImpl
public void buildDataSourceImpl() throws ExceptionbuildDataSourceImpl- Throws:
Exception- exception
-
buildTimeOut
public LegacyTxDataSourceImpl buildTimeOut(Long blockingTimeoutMillis, Long idleTimeoutMinutes, Integer allocationRetry, Long allocationRetryWaitMillis, Integer xaResourceTimeout, Boolean setTxQueryTimeout, Long queryTimeout, Long useTryLock) throws Exception
build timeout part- Parameters:
blockingTimeoutMillis- blockingTimeoutMillisidleTimeoutMinutes- idleTimeoutMinutesallocationRetry- allocationRetryallocationRetryWaitMillis- allocationRetryWaitMillisxaResourceTimeout- xaResourceTimeoutsetTxQueryTimeout- setTxQueryTimeoutqueryTimeout- queryTimeoutuseTryLock- useTryLock- Returns:
- this
- Throws:
Exception- exception
-
buildDsSecurity
public LegacyTxDataSourceImpl buildDsSecurity(String userName, String password, String securityDomain, Extension reauthPlugin) throws Exception
build security part- Parameters:
userName- userNamepassword- passwordsecurityDomain- securityDomainreauthPlugin- reauthPlugin- Returns:
- this
- Throws:
Exception- exception
-
buildStatement
public LegacyTxDataSourceImpl buildStatement(Boolean sharePreparedStatements, Long preparedStatementsCacheSize, Statement.TrackStatementsEnum trackStatements) throws Exception
build statement part- Parameters:
sharePreparedStatements- sharePreparedStatementspreparedStatementsCacheSize- preparedStatementsCacheSizetrackStatements- trackStatements- Returns:
- this
- Throws:
Exception- exception
-
buildValidation
public LegacyTxDataSourceImpl buildValidation(Boolean backgroundValidation, Long backgroundValidationMillis, Boolean useFastFail, Extension validConnectionChecker, String checkValidConnectionSql, Boolean validateOnMatch, Extension staleConnectionChecker, Extension exceptionSorter) throws Exception
build validation part- Parameters:
backgroundValidation- backgroundValidationbackgroundValidationMillis- backgroundValidationMillisuseFastFail- useFastFailvalidConnectionChecker- validConnectionCheckercheckValidConnectionSql- checkValidConnectionSqlvalidateOnMatch- validateOnMatchstaleConnectionChecker- staleConnectionCheckerexceptionSorter- exceptionSorter- Returns:
- this
- Throws:
Exception- exception
-
buildCommonPool
public LegacyTxDataSourceImpl buildCommonPool(Integer minPoolSize, Integer initialPoolSize, Integer maxPoolSize, Boolean prefill, Boolean useStrictMin, FlushStrategy flushStrategy) throws Exception
build pool part- Parameters:
minPoolSize- minPoolSizeinitialPoolSize- initialPoolSizemaxPoolSize- maxPoolSizeprefill- prefilluseStrictMin- useStrictMinflushStrategy- flushStrategy- Returns:
- this
- Throws:
Exception- exception
-
buildOther
public LegacyTxDataSourceImpl buildOther(String urlDelimiter, String urlSelectorStrategyClassName, String newConnectionSql, Boolean useJavaContext, String poolName, Boolean enabled, String jndiName, Boolean spy, Boolean useCcm, Boolean jta)
build other properties- Parameters:
urlDelimiter- urlDelimiterurlSelectorStrategyClassName- urlSelectorStrategyClassNamenewConnectionSql- newConnectionSqluseJavaContext- useJavaContextpoolName- poolNameenabled- enabledjndiName- jndiNamespy- spyuseCcm- useCcmjta- jta- Returns:
- this
-
getConnectionUrl
public String getConnectionUrl()
Description copied from interface:NoTxDataSourceGet the connectionUrl.- Specified by:
getConnectionUrlin interfaceNoTxDataSource- Returns:
- the connectionUrl.
-
getDriverClass
public String getDriverClass()
Description copied from interface:NoTxDataSourceGet the driverClass.- Specified by:
getDriverClassin interfaceNoTxDataSource- Returns:
- the driverClass.
-
getConnectionProperties
public Map<String,String> getConnectionProperties()
Description copied from interface:NoTxDataSourceGet the connectionProperties.- Specified by:
getConnectionPropertiesin interfaceNoTxDataSource- Returns:
- the connectionProperties.
-
getJndiName
public String getJndiName()
Description copied from interface:ConnectionFactoryGet the jndiName.- Specified by:
getJndiNamein interfaceConnectionFactory- Returns:
- the jndiName.
-
isUseJavaContext
public Boolean isUseJavaContext()
Description copied from interface:DataSourceGet the useJavaContext.- Specified by:
isUseJavaContextin interfaceDataSource- Returns:
- the useJavaContext.
-
getUrlDelimiter
public String getUrlDelimiter()
Description copied from interface:DataSourceGet the urlDelimiter.- Specified by:
getUrlDelimiterin interfaceDataSource- Returns:
- the urlDelimiter.
-
getUrlSelectorStrategyClassName
public String getUrlSelectorStrategyClassName()
Description copied from interface:DataSourceGet the urlSelectorStrategyClassName.- Specified by:
getUrlSelectorStrategyClassNamein interfaceDataSource- Returns:
- the urlSelectorStrategyClassName.
-
getUserName
public String getUserName()
Description copied from interface:DataSourceGet the userName.- Specified by:
getUserNamein interfaceDataSource- Returns:
- the userName.
-
getPassword
public String getPassword()
Description copied from interface:DataSourceGet the password.- Specified by:
getPasswordin interfaceDataSource- Returns:
- the password.
-
getSecurityDomain
public String getSecurityDomain()
Description copied from interface:ConnectionFactoryget the security domain for pure security-domain security management- Specified by:
getSecurityDomainin interfaceConnectionFactory- Returns:
- the security-domain to use
-
getMinPoolSize
public Integer getMinPoolSize()
Description copied from interface:ConnectionFactoryGet the minPoolSize.- Specified by:
getMinPoolSizein interfaceConnectionFactory- Returns:
- the minPoolSize.
-
getMaxPoolSize
public Integer getMaxPoolSize()
Description copied from interface:ConnectionFactoryGet the maxPoolSize.- Specified by:
getMaxPoolSizein interfaceConnectionFactory- Returns:
- the maxPoolSize.
-
getBlockingTimeoutMillis
public Long getBlockingTimeoutMillis()
Description copied from interface:ConnectionFactoryGet the blockingTimeoutMillis.- Specified by:
getBlockingTimeoutMillisin interfaceConnectionFactory- Returns:
- the blockingTimeoutMillis.
-
isBackgroundValidation
public Boolean isBackgroundValidation()
Description copied from interface:ConnectionFactoryGet the backgroundValidation.- Specified by:
isBackgroundValidationin interfaceConnectionFactory- Returns:
- the backgroundValidation.
-
getBackgroundValidationMillis
public Long getBackgroundValidationMillis()
Description copied from interface:ConnectionFactoryGet the backgroundValidationMillis.- Specified by:
getBackgroundValidationMillisin interfaceConnectionFactory- Returns:
- the backgroundValidationMillis.
-
getIdleTimeoutMinutes
public Long getIdleTimeoutMinutes()
Description copied from interface:ConnectionFactoryGet the idleTimeoutMinutes.- Specified by:
getIdleTimeoutMinutesin interfaceConnectionFactory- Returns:
- the idleTimeoutMinutes.
-
getAllocationRetry
public Integer getAllocationRetry()
Description copied from interface:ConnectionFactoryGet the allocationRetryWaitMillis.- Specified by:
getAllocationRetryin interfaceConnectionFactory- Returns:
- the allocationRetryWaitMillis.
-
getAllocationRetryWaitMillis
public Long getAllocationRetryWaitMillis()
Description copied from interface:ConnectionFactoryGet the allocationRetryWaitMillis.- Specified by:
getAllocationRetryWaitMillisin interfaceConnectionFactory- Returns:
- the allocationRetryWaitMillis.
-
isValidateOnMatch
public Boolean isValidateOnMatch()
Description copied from interface:DataSourceGet the validateOnMatch.- Specified by:
isValidateOnMatchin interfaceDataSource- Returns:
- the validateOnMatch.
-
getNewConnectionSql
public String getNewConnectionSql()
Description copied from interface:DataSourceGet the newConnectionSql.- Specified by:
getNewConnectionSqlin interfaceDataSource- Returns:
- the newConnectionSql.
-
getCheckValidConnectionSql
public String getCheckValidConnectionSql()
Description copied from interface:DataSourceGet the checkValidConnectionSql.- Specified by:
getCheckValidConnectionSqlin interfaceDataSource- Returns:
- the checkValidConnectionSql.
-
getValidConnectionChecker
public Extension getValidConnectionChecker()
Description copied from interface:DataSourceGet the validConnectionChecker- Specified by:
getValidConnectionCheckerin interfaceDataSource- Returns:
- the validConnectionChecker
-
getExceptionSorter
public Extension getExceptionSorter()
Description copied from interface:DataSourceGet the exceptionSorter- Specified by:
getExceptionSorterin interfaceDataSource- Returns:
- the exceptionSorter
-
getStaleConnectionChecker
public Extension getStaleConnectionChecker()
Description copied from interface:DataSourceGet the staleConnectionChecker- Specified by:
getStaleConnectionCheckerin interfaceDataSource- Returns:
- the staleConnectionChecker
-
getTrackStatements
public Statement.TrackStatementsEnum getTrackStatements()
Description copied from interface:DataSourceGet the trackStatements.- Specified by:
getTrackStatementsin interfaceDataSource- Returns:
- the trackStatements.
-
isPrefill
public Boolean isPrefill()
Description copied from interface:ConnectionFactoryGet the prefill.- Specified by:
isPrefillin interfaceConnectionFactory- Returns:
- the prefill.
-
isUseFastFail
public Boolean isUseFastFail()
Description copied from interface:ConnectionFactoryGet the useFastFail.- Specified by:
isUseFastFailin interfaceConnectionFactory- Returns:
- the useFastFail.
-
getPreparedStatementsCacheSize
public Long getPreparedStatementsCacheSize()
Description copied from interface:DataSourceGet the preparedStatementsCacheSize.- Specified by:
getPreparedStatementsCacheSizein interfaceDataSource- Returns:
- the preparedStatementsCacheSize.
-
isSharePreparedStatements
public Boolean isSharePreparedStatements()
Description copied from interface:DataSourceGet the sharePreparedStatements.- Specified by:
isSharePreparedStatementsin interfaceDataSource- Returns:
- the sharePreparedStatements.
-
isSetTxQueryTimeout
public Boolean isSetTxQueryTimeout()
Description copied from interface:DataSourceGet the setTxQuertTimeout.- Specified by:
isSetTxQueryTimeoutin interfaceDataSource- Returns:
- the setTxQuertTimeout.
-
getQueryTimeout
public Long getQueryTimeout()
Description copied from interface:DataSourceGet the queryTimeout.- Specified by:
getQueryTimeoutin interfaceDataSource- Returns:
- the queryTimeout.
-
getUseTryLock
public Long getUseTryLock()
Description copied from interface:DataSourceGet the useTryLock.- Specified by:
getUseTryLockin interfaceDataSource- Returns:
- the useTryLock.
-
getTransactionIsolation
public TransactionIsolation getTransactionIsolation()
Description copied from interface:LocalTxDataSourceGet the transactionIsolation.- Specified by:
getTransactionIsolationin interfaceLocalTxDataSource- Returns:
- the transactionIsolation.
-
isNoTxSeparatePools
public boolean isNoTxSeparatePools()
Description copied from interface:LocalTxDataSourceisNoTxSeparatePools- Specified by:
isNoTxSeparatePoolsin interfaceLocalTxDataSource- Returns:
- nTxSeparatePools
-
-