public abstract class InstanceKeyDataSource extends Object implements DataSource, Referenceable, Serializable
The base class for SharedPoolDataSource and
PerUserPoolDataSource.
| Modifier and Type | Field and Description |
|---|---|
protected String |
instanceKey
Instance key
|
protected static int |
UNKNOWN_TRANSACTIONISOLATION
Internal constant to indicate the level is not set.
|
| Constructor and Description |
|---|
InstanceKeyDataSource() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetParentLoggerprotected static final int UNKNOWN_TRANSACTIONISOLATION
protected String instanceKey
protected void assertInitializationAllowed()
throws IllegalStateException
IllegalStateExceptionprotected abstract org.datanucleus.store.rdbms.datasource.dbcp.datasources.PooledConnectionManager getConnectionManager(org.datanucleus.store.rdbms.datasource.dbcp.datasources.UserPassKey upkey)
public boolean isWrapperFor(Class<?> iface) throws SQLException
isWrapperFor in interface WrapperSQLExceptionpublic <T> T unwrap(Class<T> iface) throws SQLException
unwrap in interface WrapperSQLExceptionpublic ConnectionPoolDataSource getConnectionPoolDataSource()
public void setConnectionPoolDataSource(ConnectionPoolDataSource v)
public String getDataSourceName()
public void setDataSourceName(String v)
public boolean isDefaultAutoCommit()
public void setDefaultAutoCommit(boolean v)
public boolean isDefaultReadOnly()
public void setDefaultReadOnly(boolean v)
public int getDefaultTransactionIsolation()
public void setDefaultTransactionIsolation(int v)
public String getDescription()
public void setDescription(String v)
public int getLoginTimeout()
getLoginTimeout in interface CommonDataSourcepublic void setLoginTimeout(int v)
setLoginTimeout in interface CommonDataSourcepublic PrintWriter getLogWriter()
getLogWriter in interface CommonDataSourcepublic void setLogWriter(PrintWriter v)
setLogWriter in interface CommonDataSourcepublic final boolean isTestOnBorrow()
public boolean getTestOnBorrow()
public void setTestOnBorrow(boolean testOnBorrow)
public final boolean isTestOnReturn()
public boolean getTestOnReturn()
public void setTestOnReturn(boolean testOnReturn)
public int getTimeBetweenEvictionRunsMillis()
public void setTimeBetweenEvictionRunsMillis(int timeBetweenEvictionRunsMillis)
public int getNumTestsPerEvictionRun()
public void setNumTestsPerEvictionRun(int numTestsPerEvictionRun)
public int getMinEvictableIdleTimeMillis()
public void setMinEvictableIdleTimeMillis(int minEvictableIdleTimeMillis)
public final boolean isTestWhileIdle()
public boolean getTestWhileIdle()
public void setTestWhileIdle(boolean testWhileIdle)
public String getValidationQuery()
public void setValidationQuery(String validationQuery)
public boolean isRollbackAfterValidation()
public void setRollbackAfterValidation(boolean rollbackAfterValidation)
public Connection getConnection() throws SQLException
getConnection in interface DataSourceSQLExceptionpublic Connection getConnection(String username, String password) throws SQLException
getConnection in interface DataSourceSQLExceptionprotected abstract org.datanucleus.store.rdbms.datasource.dbcp.datasources.PooledConnectionAndInfo getPooledConnectionAndInfo(String username, String password) throws SQLException
SQLExceptionprotected abstract void setupDefaults(Connection con, String username) throws SQLException
SQLExceptionprotected ConnectionPoolDataSource testCPDS(String username, String password) throws NamingException, SQLException
NamingExceptionSQLExceptionprotected byte whenExhaustedAction(int maxActive,
int maxWait)
public Reference getReference() throws NamingException
getReference in interface ReferenceableNamingExceptionCopyright © 2015. All rights reserved.