Package org.opennms.core.db
Class AtomikosDataSourceFactory
- java.lang.Object
-
- com.atomikos.jdbc.AbstractDataSourceBean
-
- com.atomikos.jdbc.AtomikosDataSourceBean
-
- org.opennms.core.db.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
-
Constructor Summary
Constructors Constructor Description AtomikosDataSourceFactory()
AtomikosDataSourceFactory(JdbcDataSource ds)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
afterPropertiesSet()
This call will initialize theAtomikosDataSourceBean
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 org.opennms.core.db.ClosableDataSource
close, setLoginTimeout
-
-
-
-
Constructor Detail
-
AtomikosDataSourceFactory
public AtomikosDataSourceFactory(JdbcDataSource ds)
-
AtomikosDataSourceFactory
public AtomikosDataSourceFactory()
-
-
Method Detail
-
afterPropertiesSet
public void afterPropertiesSet() throws java.lang.Exception
This call will initialize theAtomikosDataSourceBean
after the properties have been set when this factory is used in a Spring context.- Specified by:
afterPropertiesSet
in interfaceorg.springframework.beans.factory.InitializingBean
- Throws:
java.lang.Exception
-
getParentLogger
public java.util.logging.Logger getParentLogger() throws java.sql.SQLFeatureNotSupportedException
- Specified by:
getParentLogger
in interfacejavax.sql.CommonDataSource
- Overrides:
getParentLogger
in classcom.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 interfacejava.sql.Wrapper
- Overrides:
unwrap
in classcom.atomikos.jdbc.AbstractDataSourceBean
- Throws:
java.sql.SQLException
-
isWrapperFor
public boolean isWrapperFor(java.lang.Class<?> iface)
- Specified by:
isWrapperFor
in interfacejava.sql.Wrapper
- Overrides:
isWrapperFor
in classcom.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 interfaceClosableDataSource
-
setMinPool
public void setMinPool(int minPool)
Description copied from interface:ClosableDataSource
The minimum number of pooled connections to retain.- Specified by:
setMinPool
in interfaceClosableDataSource
-
setMaxPool
public void setMaxPool(int maxPool)
Description copied from interface:ClosableDataSource
The maximum number of pooled connections to retain.- Specified by:
setMaxPool
in interfaceClosableDataSource
-
setMaxSize
public void setMaxSize(int maxSize)
Description copied from interface:ClosableDataSource
The maximum number of connections that can be created.- Specified by:
setMaxSize
in interfaceClosableDataSource
-
-