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
  • Constructor Details

    • LegacyTxDataSourceImpl

      public LegacyTxDataSourceImpl(String connectionUrl, String driverClass, String dataSourceClass, String driver, org.jboss.jca.common.api.metadata.ds.TransactionIsolation transactionIsolation, Map<String,String> connectionProperties)
      create a LegacyTxDataSourceImpl
      Parameters:
      connectionUrl - connectionUrl
      driverClass - driverClass
      dataSourceClass - dataSourceClass
      driver - driver
      transactionIsolation - transactionIsolation
      connectionProperties - connectionProperties
  • Method Details

    • buildDataSourceImpl

      public void buildDataSourceImpl() throws Exception
      buildDataSourceImpl
      Throws:
      Exception - exception
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • 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 - blockingTimeoutMillis
      idleTimeoutMinutes - idleTimeoutMinutes
      allocationRetry - allocationRetry
      allocationRetryWaitMillis - allocationRetryWaitMillis
      xaResourceTimeout - xaResourceTimeout
      setTxQueryTimeout - setTxQueryTimeout
      queryTimeout - queryTimeout
      useTryLock - useTryLock
      Returns:
      this
      Throws:
      Exception - exception
    • buildDsSecurity

      public LegacyTxDataSourceImpl buildDsSecurity(String userName, String password, String securityDomain, org.jboss.jca.common.api.metadata.common.Extension reauthPlugin) throws Exception
      build security part
      Parameters:
      userName - userName
      password - password
      securityDomain - securityDomain
      reauthPlugin - reauthPlugin
      Returns:
      this
      Throws:
      Exception - exception
    • buildStatement

      public LegacyTxDataSourceImpl buildStatement(Boolean sharePreparedStatements, Long preparedStatementsCacheSize, org.jboss.jca.common.api.metadata.ds.Statement.TrackStatementsEnum trackStatements) throws Exception
      build statement part
      Parameters:
      sharePreparedStatements - sharePreparedStatements
      preparedStatementsCacheSize - preparedStatementsCacheSize
      trackStatements - trackStatements
      Returns:
      this
      Throws:
      Exception - exception
    • buildValidation

      public LegacyTxDataSourceImpl buildValidation(Boolean backgroundValidation, Long backgroundValidationMillis, Boolean useFastFail, org.jboss.jca.common.api.metadata.common.Extension validConnectionChecker, String checkValidConnectionSql, Boolean validateOnMatch, org.jboss.jca.common.api.metadata.common.Extension staleConnectionChecker, org.jboss.jca.common.api.metadata.common.Extension exceptionSorter) throws Exception
      build validation part
      Parameters:
      backgroundValidation - backgroundValidation
      backgroundValidationMillis - backgroundValidationMillis
      useFastFail - useFastFail
      validConnectionChecker - validConnectionChecker
      checkValidConnectionSql - checkValidConnectionSql
      validateOnMatch - validateOnMatch
      staleConnectionChecker - staleConnectionChecker
      exceptionSorter - exceptionSorter
      Returns:
      this
      Throws:
      Exception - exception
    • buildCommonPool

      public LegacyTxDataSourceImpl buildCommonPool(Integer minPoolSize, Integer initialPoolSize, Integer maxPoolSize, Boolean prefill, Boolean useStrictMin, org.jboss.jca.common.api.metadata.common.FlushStrategy flushStrategy) throws Exception
      build pool part
      Parameters:
      minPoolSize - minPoolSize
      initialPoolSize - initialPoolSize
      maxPoolSize - maxPoolSize
      prefill - prefill
      useStrictMin - useStrictMin
      flushStrategy - 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 - urlDelimiter
      urlSelectorStrategyClassName - urlSelectorStrategyClassName
      newConnectionSql - newConnectionSql
      useJavaContext - useJavaContext
      poolName - poolName
      enabled - enabled
      jndiName - jndiName
      spy - spy
      useCcm - useCcm
      jta - jta
      Returns:
      this
    • getConnectionUrl

      public String getConnectionUrl()
      Description copied from interface: NoTxDataSource
      Get the connectionUrl.
      Specified by:
      getConnectionUrl in interface NoTxDataSource
      Returns:
      the connectionUrl.
    • getDriverClass

      public String getDriverClass()
      Description copied from interface: NoTxDataSource
      Get the driverClass.
      Specified by:
      getDriverClass in interface NoTxDataSource
      Returns:
      the driverClass.
    • getConnectionProperties

      public Map<String,String> getConnectionProperties()
      Description copied from interface: NoTxDataSource
      Get the connectionProperties.
      Specified by:
      getConnectionProperties in interface NoTxDataSource
      Returns:
      the connectionProperties.
    • getJndiName

      public String getJndiName()
      Description copied from interface: ConnectionFactory
      Get the jndiName.
      Specified by:
      getJndiName in interface ConnectionFactory
      Returns:
      the jndiName.
    • isUseJavaContext

      public Boolean isUseJavaContext()
      Description copied from interface: DataSource
      Get the useJavaContext.
      Specified by:
      isUseJavaContext in interface DataSource
      Returns:
      the useJavaContext.
    • getUrlDelimiter

      public String getUrlDelimiter()
      Description copied from interface: DataSource
      Get the urlDelimiter.
      Specified by:
      getUrlDelimiter in interface DataSource
      Returns:
      the urlDelimiter.
    • getUrlSelectorStrategyClassName

      public String getUrlSelectorStrategyClassName()
      Description copied from interface: DataSource
      Get the urlSelectorStrategyClassName.
      Specified by:
      getUrlSelectorStrategyClassName in interface DataSource
      Returns:
      the urlSelectorStrategyClassName.
    • getUserName

      public String getUserName()
      Description copied from interface: DataSource
      Get the userName.
      Specified by:
      getUserName in interface DataSource
      Returns:
      the userName.
    • getPassword

      public String getPassword()
      Description copied from interface: DataSource
      Get the password.
      Specified by:
      getPassword in interface DataSource
      Returns:
      the password.
    • getSecurityDomain

      public String getSecurityDomain()
      Description copied from interface: ConnectionFactory
      get the security domain for pure security-domain security management
      Specified by:
      getSecurityDomain in interface ConnectionFactory
      Returns:
      the security-domain to use
    • getMinPoolSize

      public Integer getMinPoolSize()
      Description copied from interface: ConnectionFactory
      Get the minPoolSize.
      Specified by:
      getMinPoolSize in interface ConnectionFactory
      Returns:
      the minPoolSize.
    • getMaxPoolSize

      public Integer getMaxPoolSize()
      Description copied from interface: ConnectionFactory
      Get the maxPoolSize.
      Specified by:
      getMaxPoolSize in interface ConnectionFactory
      Returns:
      the maxPoolSize.
    • getBlockingTimeoutMillis

      public Long getBlockingTimeoutMillis()
      Description copied from interface: ConnectionFactory
      Get the blockingTimeoutMillis.
      Specified by:
      getBlockingTimeoutMillis in interface ConnectionFactory
      Returns:
      the blockingTimeoutMillis.
    • isBackgroundValidation

      public Boolean isBackgroundValidation()
      Description copied from interface: ConnectionFactory
      Get the backgroundValidation.
      Specified by:
      isBackgroundValidation in interface ConnectionFactory
      Returns:
      the backgroundValidation.
    • getBackgroundValidationMillis

      public Long getBackgroundValidationMillis()
      Description copied from interface: ConnectionFactory
      Get the backgroundValidationMillis.
      Specified by:
      getBackgroundValidationMillis in interface ConnectionFactory
      Returns:
      the backgroundValidationMillis.
    • getIdleTimeoutMinutes

      public Long getIdleTimeoutMinutes()
      Description copied from interface: ConnectionFactory
      Get the idleTimeoutMinutes.
      Specified by:
      getIdleTimeoutMinutes in interface ConnectionFactory
      Returns:
      the idleTimeoutMinutes.
    • getAllocationRetry

      public Integer getAllocationRetry()
      Description copied from interface: ConnectionFactory
      Get the allocationRetryWaitMillis.
      Specified by:
      getAllocationRetry in interface ConnectionFactory
      Returns:
      the allocationRetryWaitMillis.
    • getAllocationRetryWaitMillis

      public Long getAllocationRetryWaitMillis()
      Description copied from interface: ConnectionFactory
      Get the allocationRetryWaitMillis.
      Specified by:
      getAllocationRetryWaitMillis in interface ConnectionFactory
      Returns:
      the allocationRetryWaitMillis.
    • isValidateOnMatch

      public Boolean isValidateOnMatch()
      Description copied from interface: DataSource
      Get the validateOnMatch.
      Specified by:
      isValidateOnMatch in interface DataSource
      Returns:
      the validateOnMatch.
    • getNewConnectionSql

      public String getNewConnectionSql()
      Description copied from interface: DataSource
      Get the newConnectionSql.
      Specified by:
      getNewConnectionSql in interface DataSource
      Returns:
      the newConnectionSql.
    • getCheckValidConnectionSql

      public String getCheckValidConnectionSql()
      Description copied from interface: DataSource
      Get the checkValidConnectionSql.
      Specified by:
      getCheckValidConnectionSql in interface DataSource
      Returns:
      the checkValidConnectionSql.
    • getValidConnectionChecker

      public org.jboss.jca.common.api.metadata.common.Extension getValidConnectionChecker()
      Description copied from interface: DataSource
      Get the validConnectionChecker
      Specified by:
      getValidConnectionChecker in interface DataSource
      Returns:
      the validConnectionChecker
    • getExceptionSorter

      public org.jboss.jca.common.api.metadata.common.Extension getExceptionSorter()
      Description copied from interface: DataSource
      Get the exceptionSorter
      Specified by:
      getExceptionSorter in interface DataSource
      Returns:
      the exceptionSorter
    • getStaleConnectionChecker

      public org.jboss.jca.common.api.metadata.common.Extension getStaleConnectionChecker()
      Description copied from interface: DataSource
      Get the staleConnectionChecker
      Specified by:
      getStaleConnectionChecker in interface DataSource
      Returns:
      the staleConnectionChecker
    • getTrackStatements

      public org.jboss.jca.common.api.metadata.ds.Statement.TrackStatementsEnum getTrackStatements()
      Description copied from interface: DataSource
      Get the trackStatements.
      Specified by:
      getTrackStatements in interface DataSource
      Returns:
      the trackStatements.
    • isPrefill

      public Boolean isPrefill()
      Description copied from interface: ConnectionFactory
      Get the prefill.
      Specified by:
      isPrefill in interface ConnectionFactory
      Returns:
      the prefill.
    • isUseFastFail

      public Boolean isUseFastFail()
      Description copied from interface: ConnectionFactory
      Get the useFastFail.
      Specified by:
      isUseFastFail in interface ConnectionFactory
      Returns:
      the useFastFail.
    • getPreparedStatementsCacheSize

      public Long getPreparedStatementsCacheSize()
      Description copied from interface: DataSource
      Get the preparedStatementsCacheSize.
      Specified by:
      getPreparedStatementsCacheSize in interface DataSource
      Returns:
      the preparedStatementsCacheSize.
    • isSharePreparedStatements

      public Boolean isSharePreparedStatements()
      Description copied from interface: DataSource
      Get the sharePreparedStatements.
      Specified by:
      isSharePreparedStatements in interface DataSource
      Returns:
      the sharePreparedStatements.
    • isSetTxQueryTimeout

      public Boolean isSetTxQueryTimeout()
      Description copied from interface: DataSource
      Get the setTxQuertTimeout.
      Specified by:
      isSetTxQueryTimeout in interface DataSource
      Returns:
      the setTxQuertTimeout.
    • getQueryTimeout

      public Long getQueryTimeout()
      Description copied from interface: DataSource
      Get the queryTimeout.
      Specified by:
      getQueryTimeout in interface DataSource
      Returns:
      the queryTimeout.
    • getUseTryLock

      public Long getUseTryLock()
      Description copied from interface: DataSource
      Get the useTryLock.
      Specified by:
      getUseTryLock in interface DataSource
      Returns:
      the useTryLock.
    • getTransactionIsolation

      public org.jboss.jca.common.api.metadata.ds.TransactionIsolation getTransactionIsolation()
      Description copied from interface: LocalTxDataSource
      Get the transactionIsolation.
      Specified by:
      getTransactionIsolation in interface LocalTxDataSource
      Returns:
      the transactionIsolation.
    • isNoTxSeparatePools

      public boolean isNoTxSeparatePools()
      Description copied from interface: LocalTxDataSource
      isNoTxSeparatePools
      Specified by:
      isNoTxSeparatePools in interface LocalTxDataSource
      Returns:
      nTxSeparatePools