Class AtomikosDataSourceFactory

  • All Implemented Interfaces:
    com.atomikos.datasource.pool.ConnectionPoolProperties, com.atomikos.jdbc.HeuristicDataSource, java.io.Closeable, java.io.Serializable, java.lang.AutoCloseable, java.sql.Wrapper, javax.naming.Referenceable, javax.sql.CommonDataSource, javax.sql.DataSource, ClosableDataSource, org.springframework.beans.factory.InitializingBean

    public class AtomikosDataSourceFactory
    extends com.atomikos.jdbc.AtomikosDataSourceBean
    implements org.springframework.beans.factory.InitializingBean, ClosableDataSource
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static org.slf4j.Logger LOG  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void afterPropertiesSet()
      This call will initialize the AtomikosDataSourceBean after the properties have been set when this factory is used in a Spring context.
      java.util.logging.Logger getParentLogger()  
      boolean isWrapperFor​(java.lang.Class<?> iface)  
      void setIdleTimeout​(int idleTimeout)
      How long, in seconds, an idle connection is kept in the pool before it is removed.
      void setMaxPool​(int maxPool)
      The maximum number of pooled connections to retain.
      void setMaxSize​(int maxSize)
      The maximum number of connections that can be created.
      void setMinPool​(int minPool)
      The minimum number of pooled connections to retain.
      <T> T unwrap​(java.lang.Class<T> iface)  
      • Methods inherited from class com.atomikos.jdbc.AtomikosDataSourceBean

        doClose, doInit, getXaDataSource, getXaDataSourceClassName, getXaProperties, isAssignableFromWrappedVendorClass, printXaProperties, setXaDataSource, setXaDataSourceClassName, setXaProperties, toString, unwrapVendorInstance
      • Methods inherited from class com.atomikos.jdbc.AbstractDataSourceBean

        close, getBorrowConnectionTimeout, getConnection, getConnection, getConnection, getConnection, getConnection, getConnection, getDefaultIsolationLevel, getLocalTransactionMode, getLoginTimeout, getLogWriter, getMaintenanceInterval, getMaxIdleTime, getMaxLifetime, getMaxPoolSize, getMinPoolSize, getReapTimeout, getReference, getTestQuery, getUniqueResourceName, init, poolAvailableSize, poolTotalSize, refreshPool, setBorrowConnectionTimeout, setDefaultIsolationLevel, setLoginTimeout, setLogWriter, setMaintenanceInterval, setMaxIdleTime, setMaxLifetime, setMaxPoolSize, setMinPoolSize, setPoolSize, setReapTimeout, setTestQuery, setUniqueResourceName, throwAtomikosSQLException, throwAtomikosSQLException
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface javax.sql.CommonDataSource

        createShardingKeyBuilder
      • Methods inherited from interface javax.sql.DataSource

        createConnectionBuilder, getConnection, getConnection, getLoginTimeout, getLogWriter, setLogWriter
    • Field Detail

      • LOG

        public static final org.slf4j.Logger LOG
    • Constructor Detail

      • AtomikosDataSourceFactory

        public AtomikosDataSourceFactory​(JdbcDataSource ds)
      • AtomikosDataSourceFactory

        public AtomikosDataSourceFactory()
    • Method Detail

      • afterPropertiesSet

        public void afterPropertiesSet()
                                throws java.lang.Exception
        This call will initialize the AtomikosDataSourceBean after the properties have been set when this factory is used in a Spring context.
        Specified by:
        afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
        Throws:
        java.lang.Exception
      • getParentLogger

        public java.util.logging.Logger getParentLogger()
                                                 throws java.sql.SQLFeatureNotSupportedException
        Specified by:
        getParentLogger in interface javax.sql.CommonDataSource
        Overrides:
        getParentLogger in class com.atomikos.jdbc.AbstractDataSourceBean
        Throws:
        java.sql.SQLFeatureNotSupportedException
      • unwrap

        public <T> T unwrap​(java.lang.Class<T> iface)
                     throws java.sql.SQLException
        Specified by:
        unwrap in interface java.sql.Wrapper
        Overrides:
        unwrap in class com.atomikos.jdbc.AbstractDataSourceBean
        Throws:
        java.sql.SQLException
      • isWrapperFor

        public boolean isWrapperFor​(java.lang.Class<?> iface)
        Specified by:
        isWrapperFor in interface java.sql.Wrapper
        Overrides:
        isWrapperFor in class com.atomikos.jdbc.AbstractDataSourceBean
      • setIdleTimeout

        public void setIdleTimeout​(int idleTimeout)
        Description copied from interface: ClosableDataSource
        How long, in seconds, an idle connection is kept in the pool before it is removed.
        Specified by:
        setIdleTimeout in interface ClosableDataSource