Top Fields Constructors Methods
com.mchange.v2.c3p0

public final Class JndiRefConnectionPoolDataSource

extends IdentityTokenResolvable
implements ConnectionPoolDataSource, Serializable, Referenceable
Class Inheritance
All Implemented Interfaces
javax.naming.Referenceable, java.io.Serializable, javax.sql.ConnectionPoolDataSource, javax.sql.CommonDataSource
Imports
com.mchange.v2.c3p0.impl.*, java.beans.PropertyVetoException, java.io.PrintWriter, .Serializable, java.sql.SQLException, .SQLFeatureNotSupportedException, java.util.Arrays, .Collection, .Hashtable, java.util.logging.Logger, javax.naming.NamingException, .Reference, .Referenceable, javax.sql.ConnectionPoolDataSource, .PooledConnection, com.mchange.v2.beans.BeansUtils, com.mchange.v2.log.MLevel, .MLog, .MLogger, com.mchange.v2.naming.JavaBeanReferenceMaker, .JavaBeanObjectFactory, .ReferenceMaker

Field Summary

Modifier and TypeField and Description
pack-priv String
pack-priv static final Collection<E>
pack-priv JndiRefForwardingDataSource
pack-priv static final MLogger
pack-priv static final JavaBeanReferenceMaker
pack-priv WrapperConnectionPoolDataSource

Constructor Summary

AccessConstructor and Description
public
public
JndiRefConnectionPoolDataSource(boolean autoregister)

Method Summary

Modifier and TypeMethod and Description
public int
public int
public int
public String
public int
public String
public int
public String
public String
public String
public String
public int
public int
public Hashtable<K, V>
public Object
public int
getLoginTimeout()

Implements javax.sql.ConnectionPoolDataSource.getLoginTimeout.

Gets the maximum time in seconds that this data source can wait while attempting to connect to a database.

public PrintWriter
getLogWriter()

Implements javax.sql.ConnectionPoolDataSource.getLogWriter.

Retrieves the log writer for this DataSource object.

public String
public int
public int
public int
public int
public int
public int
public int
public int
public Logger
getParentLogger()

Implements javax.sql.CommonDataSource.getParentLogger.

Return the parent Logger of all the Loggers used by this data source.

public PooledConnection
getPooledConnection()

Implements javax.sql.ConnectionPoolDataSource.getPooledConnection.

Attempts to establish a physical database connection that can be used as a pooled connection.

public PooledConnection
getPooledConnection(String
the database user on whose behalf the connection is being made
user
,
String
the user's password
password
)

Implements javax.sql.ConnectionPoolDataSource.getPooledConnection.

Attempts to establish a physical database connection that can be used as a pooled connection.

public String
public int
public Reference
getReference()

Implements javax.naming.Referenceable.getReference.

Retrieves the Reference of this object.

public int
public String
public int
public String
public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
public void
setAcquireIncrement(int acquireIncrement)

public void
public void
public void
setAttemptResurrectOnCheckin(boolean attemptResurrectOnCheckin)

public void
setAutoCommitOnClose(boolean autoCommitOnClose)

public void
public void
public void
public void
setConnectionCustomizerClassName(String connectionCustomizerClassName)

public void
public void
setConnectionTesterClassName(String connectionTesterClassName)

public void
setContextClassLoaderSource(String contextClassLoaderSource)

public void
setDebugUnreturnedConnectionStackTraces(boolean debugUnreturnedConnectionStackTraces)

public void
setFactoryClassLocation(String factoryClassLocation)

public void
setForceIgnoreUnresolvedTransactions(boolean forceIgnoreUnresolvedTransactions)

public void
setForceSynchronousCheckins(boolean forceSynchronousCheckins)

public void
public void
setIdleConnectionTestPeriod(int idleConnectionTestPeriod)

public void
setInitialPoolSize(int initialPoolSize)

public void
setJndiEnv(Hashtable<K, V> jndiEnv)

public void
setJndiLookupCaching(boolean caching)

public void
setJndiName(Object jndiName)

public void
setLoginTimeout(int
the data source login time limit
seconds
)

Implements javax.sql.ConnectionPoolDataSource.setLoginTimeout.

Sets the maximum time in seconds that this data source will wait while attempting to connect to a database.

public void
setLogWriter(PrintWriter
the new log writer; to disable logging, set to null
out
)

Implements javax.sql.ConnectionPoolDataSource.setLogWriter.

Sets the log writer for this DataSource object to the given java.io.PrintWriter object.

public void
setMarkSessionBoundaries(String markSessionBoundaries)

public void
setMaxAdministrativeTaskTime(int maxAdministrativeTaskTime)

public void
setMaxConnectionAge(int maxConnectionAge)

public void
setMaxIdleTime(int maxIdleTime)

public void
setMaxIdleTimeExcessConnections(int maxIdleTimeExcessConnections)

public void
setMaxPoolSize(int maxPoolSize)

public void
setMaxStatements(int maxStatements)

public void
public void
setMinPoolSize(int minPoolSize)

public void
public void
setPrivilegeSpawnedThreads(boolean privilegeSpawnedThreads)

public void
setPropertyCycle(int propertyCycle)

public void
setStatementCacheNumDeferredCloseThreads(int statementCacheNumDeferredCloseThreads)

public void
setTaskRunnerFactoryClassName(String taskRunnerFactoryClassName)

public void
setTestConnectionOnCheckin(boolean testConnectionOnCheckin)

public void
setTestConnectionOnCheckout(boolean testConnectionOnCheckout)

public void
setUnreturnedConnectionTimeout(int unreturnedConnectionTimeout)

public void
setUserOverridesAsString(String userOverridesAsString)

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from com.mchange.v2.c3p0.impl.IdentityTokenResolvable:
doResolvereadResolveverifyResolve

Field Detail

identityTokenback to summary
pack-priv String identityToken
IGNORE_PROPSback to summary
pack-priv static final Collection<E> IGNORE_PROPS
jrfdsback to summary
pack-priv JndiRefForwardingDataSource jrfds
loggerback to summary
pack-priv static final MLogger logger
referenceMakerback to summary
pack-priv static final JavaBeanReferenceMaker referenceMaker
wcpdsback to summary
pack-priv WrapperConnectionPoolDataSource wcpds

Constructor Detail

JndiRefConnectionPoolDataSourceback to summary
public JndiRefConnectionPoolDataSource()
JndiRefConnectionPoolDataSourceback to summary
public JndiRefConnectionPoolDataSource(boolean autoregister)

Method Detail

getAcquireIncrementback to summary
public int getAcquireIncrement()
getAcquireRetryAttemptsback to summary
public int getAcquireRetryAttempts()
getAcquireRetryDelayback to summary
public int getAcquireRetryDelay()
getAutomaticTestTableback to summary
public String getAutomaticTestTable()
getCheckoutTimeoutback to summary
public int getCheckoutTimeout()
getConnectionCustomizerClassNameback to summary
public String getConnectionCustomizerClassName()
getConnectionIsValidTimeoutback to summary
public int getConnectionIsValidTimeout()
getConnectionTesterClassNameback to summary
public String getConnectionTesterClassName()
getContextClassLoaderSourceback to summary
public String getContextClassLoaderSource()
getFactoryClassLocationback to summary
public String getFactoryClassLocation()
getIdentityTokenback to summary
public String getIdentityToken()

Implements com.mchange.v2.c3p0.impl.IdentityTokenized.getIdentityToken.

getIdleConnectionTestPeriodback to summary
public int getIdleConnectionTestPeriod()
getInitialPoolSizeback to summary
public int getInitialPoolSize()
getJndiEnvback to summary
public Hashtable<K, V> getJndiEnv()
getJndiNameback to summary
public Object getJndiName()
getLoginTimeoutback to summary
public int getLoginTimeout() throws SQLException

Implements javax.sql.ConnectionPoolDataSource.getLoginTimeout.

Doc from javax.sql.ConnectionPoolDataSource.getLoginTimeout.

Gets the maximum time in seconds that this data source can wait while attempting to connect to a database. A value of zero means that the timeout is the default system timeout if there is one; otherwise, it means that there is no timeout. When a DataSource object is created, the login timeout is initially zero.

Returns:int

Doc from javax.sql.CommonDataSource.getLoginTimeout.

the data source login time limit

Exceptions
SQLException:

Doc from javax.sql.CommonDataSource.getLoginTimeout.

if a database access error occurs.

getLogWriterback to summary
public PrintWriter getLogWriter() throws SQLException

Implements javax.sql.ConnectionPoolDataSource.getLogWriter.

Doc from javax.sql.ConnectionPoolDataSource.getLogWriter.

Retrieves the log writer for this DataSource object.

The log writer is a character output stream to which all logging and tracing messages for this data source will be printed. This includes messages printed by the methods of this object, messages printed by methods of other objects manufactured by this object, and so on. Messages printed to a data source specific log writer are not printed to the log writer associated with the java.sql.DriverManager class. When a DataSource object is created, the log writer is initially null; in other words, the default is for logging to be disabled.

Returns:PrintWriter

Doc from javax.sql.CommonDataSource.getLogWriter.

the log writer for this data source or null if logging is disabled

Exceptions
SQLException:

Doc from javax.sql.CommonDataSource.getLogWriter.

if a database access error occurs

getMarkSessionBoundariesback to summary
public String getMarkSessionBoundaries()
getMaxAdministrativeTaskTimeback to summary
public int getMaxAdministrativeTaskTime()
getMaxConnectionAgeback to summary
public int getMaxConnectionAge()
getMaxIdleTimeback to summary
public int getMaxIdleTime()
getMaxIdleTimeExcessConnectionsback to summary
public int getMaxIdleTimeExcessConnections()
getMaxPoolSizeback to summary
public int getMaxPoolSize()
getMaxStatementsback to summary
public int getMaxStatements()
getMaxStatementsPerConnectionback to summary
public int getMaxStatementsPerConnection()
getMinPoolSizeback to summary
public int getMinPoolSize()
getParentLoggerback to summary
public Logger getParentLogger() throws SQLFeatureNotSupportedException

Implements javax.sql.CommonDataSource.getParentLogger.

Doc from javax.sql.CommonDataSource.getParentLogger.

Return the parent Logger of all the Loggers used by this data source. This should be the Logger farthest from the root Logger that is still an ancestor of all of the Loggers used by this data source. Configuring this Logger will affect all of the log messages generated by the data source. In the worst case, this may be the root Logger.

Returns:Logger

the parent Logger for this data source

Exceptions
SQLFeatureNotSupportedException:
if the data source does not use java.util.logging
getPooledConnectionback to summary
public PooledConnection getPooledConnection() throws SQLException

Implements javax.sql.ConnectionPoolDataSource.getPooledConnection.

Doc from javax.sql.ConnectionPoolDataSource.getPooledConnection.

Attempts to establish a physical database connection that can be used as a pooled connection.

Returns:PooledConnection

a PooledConnection object that is a physical connection to the database that this ConnectionPoolDataSource object represents

Exceptions
SQLException:
if a database access error occurs
getPooledConnectionback to summary
public PooledConnection getPooledConnection(String user, String password) throws SQLException

Implements javax.sql.ConnectionPoolDataSource.getPooledConnection.

Doc from javax.sql.ConnectionPoolDataSource.getPooledConnection.

Attempts to establish a physical database connection that can be used as a pooled connection.

Parameters
user:String

the database user on whose behalf the connection is being made

password:String

the user's password

Returns:PooledConnection

a PooledConnection object that is a physical connection to the database that this ConnectionPoolDataSource object represents

Exceptions
SQLException:
if a database access error occurs
getPreferredTestQueryback to summary
public String getPreferredTestQuery()
getPropertyCycleback to summary
public int getPropertyCycle()
getReferenceback to summary
public Reference getReference() throws NamingException

Implements javax.naming.Referenceable.getReference.

Doc from javax.naming.Referenceable.getReference.

Retrieves the Reference of this object.

Returns:Reference

The non-null Reference of this object.

Exceptions
NamingException:
If a naming exception was encountered while retrieving the reference.
getStatementCacheNumDeferredCloseThreadsback to summary
public int getStatementCacheNumDeferredCloseThreads()
getTaskRunnerFactoryClassNameback to summary
public String getTaskRunnerFactoryClassName()
getUnreturnedConnectionTimeoutback to summary
public int getUnreturnedConnectionTimeout()
getUserOverridesAsStringback to summary
public String getUserOverridesAsString()
isAttemptResurrectOnCheckinback to summary
public boolean isAttemptResurrectOnCheckin()
isAutoCommitOnCloseback to summary
public boolean isAutoCommitOnClose()
isBreakAfterAcquireFailureback to summary
public boolean isBreakAfterAcquireFailure()
isDebugUnreturnedConnectionStackTracesback to summary
public boolean isDebugUnreturnedConnectionStackTraces()
isForceIgnoreUnresolvedTransactionsback to summary
public boolean isForceIgnoreUnresolvedTransactions()
isForceSynchronousCheckinsback to summary
public boolean isForceSynchronousCheckins()
isJndiLookupCachingback to summary
public boolean isJndiLookupCaching()
isPrivilegeSpawnedThreadsback to summary
public boolean isPrivilegeSpawnedThreads()
isTestConnectionOnCheckinback to summary
public boolean isTestConnectionOnCheckin()
isTestConnectionOnCheckoutback to summary
public boolean isTestConnectionOnCheckout()
setAcquireIncrementback to summary
public void setAcquireIncrement(int acquireIncrement)
setAcquireRetryAttemptsback to summary
public void setAcquireRetryAttempts(int ara)
setAcquireRetryDelayback to summary
public void setAcquireRetryDelay(int ard)
setAttemptResurrectOnCheckinback to summary
public void setAttemptResurrectOnCheckin(boolean attemptResurrectOnCheckin)
setAutoCommitOnCloseback to summary
public void setAutoCommitOnClose(boolean autoCommitOnClose)
setAutomaticTestTableback to summary
public void setAutomaticTestTable(String att)
setBreakAfterAcquireFailureback to summary
public void setBreakAfterAcquireFailure(boolean baaf)
setCheckoutTimeoutback to summary
public void setCheckoutTimeout(int ct)
setConnectionCustomizerClassNameback to summary
public void setConnectionCustomizerClassName(String connectionCustomizerClassName) throws PropertyVetoException
setConnectionIsValidTimeoutback to summary
public void setConnectionIsValidTimeout(int civt)
setConnectionTesterClassNameback to summary
public void setConnectionTesterClassName(String connectionTesterClassName) throws PropertyVetoException
setContextClassLoaderSourceback to summary
public void setContextClassLoaderSource(String contextClassLoaderSource) throws PropertyVetoException
setDebugUnreturnedConnectionStackTracesback to summary
public void setDebugUnreturnedConnectionStackTraces(boolean debugUnreturnedConnectionStackTraces)
setFactoryClassLocationback to summary
public void setFactoryClassLocation(String factoryClassLocation)
setForceIgnoreUnresolvedTransactionsback to summary
public void setForceIgnoreUnresolvedTransactions(boolean forceIgnoreUnresolvedTransactions)
setForceSynchronousCheckinsback to summary
public void setForceSynchronousCheckins(boolean forceSynchronousCheckins)
setIdentityTokenback to summary
public void setIdentityToken(String identityToken)

Implements com.mchange.v2.c3p0.impl.IdentityTokenized.setIdentityToken.

setIdleConnectionTestPeriodback to summary
public void setIdleConnectionTestPeriod(int idleConnectionTestPeriod)
setInitialPoolSizeback to summary
public void setInitialPoolSize(int initialPoolSize)
setJndiEnvback to summary
public void setJndiEnv(Hashtable<K, V> jndiEnv)
setJndiLookupCachingback to summary
public void setJndiLookupCaching(boolean caching)
setJndiNameback to summary
public void setJndiName(Object jndiName) throws PropertyVetoException
setLoginTimeoutback to summary
public void setLoginTimeout(int seconds) throws SQLException

Implements javax.sql.ConnectionPoolDataSource.setLoginTimeout.

Doc from javax.sql.ConnectionPoolDataSource.setLoginTimeout.

Sets the maximum time in seconds that this data source will wait while attempting to connect to a database. A value of zero specifies that the timeout is the default system timeout if there is one; otherwise, it specifies that there is no timeout. When a DataSource object is created, the login timeout is initially zero.

Parameters
seconds:int

Doc from javax.sql.CommonDataSource.setLoginTimeout.

the data source login time limit

Exceptions
SQLException:

Doc from javax.sql.CommonDataSource.setLoginTimeout.

if a database access error occurs.

setLogWriterback to summary
public void setLogWriter(PrintWriter out) throws SQLException

Implements javax.sql.ConnectionPoolDataSource.setLogWriter.

Doc from javax.sql.ConnectionPoolDataSource.setLogWriter.

Sets the log writer for this DataSource object to the given java.io.PrintWriter object.

The log writer is a character output stream to which all logging and tracing messages for this data source will be printed. This includes messages printed by the methods of this object, messages printed by methods of other objects manufactured by this object, and so on. Messages printed to a data source- specific log writer are not printed to the log writer associated with the java.sql.DriverManager class. When a DataSource object is created the log writer is initially null; in other words, the default is for logging to be disabled.

Parameters
out:PrintWriter

Doc from javax.sql.CommonDataSource.setLogWriter.

the new log writer; to disable logging, set to null

Exceptions
SQLException:

Doc from javax.sql.CommonDataSource.setLogWriter.

if a database access error occurs

setMarkSessionBoundariesback to summary
public void setMarkSessionBoundaries(String markSessionBoundaries) throws PropertyVetoException
setMaxAdministrativeTaskTimeback to summary
public void setMaxAdministrativeTaskTime(int maxAdministrativeTaskTime)
setMaxConnectionAgeback to summary
public void setMaxConnectionAge(int maxConnectionAge)
setMaxIdleTimeback to summary
public void setMaxIdleTime(int maxIdleTime)
setMaxIdleTimeExcessConnectionsback to summary
public void setMaxIdleTimeExcessConnections(int maxIdleTimeExcessConnections)
setMaxPoolSizeback to summary
public void setMaxPoolSize(int maxPoolSize)
setMaxStatementsback to summary
public void setMaxStatements(int maxStatements)
setMaxStatementsPerConnectionback to summary
public void setMaxStatementsPerConnection(int mspc)
setMinPoolSizeback to summary
public void setMinPoolSize(int minPoolSize)
setPreferredTestQueryback to summary
public void setPreferredTestQuery(String ptq)
setPrivilegeSpawnedThreadsback to summary
public void setPrivilegeSpawnedThreads(boolean privilegeSpawnedThreads)
setPropertyCycleback to summary
public void setPropertyCycle(int propertyCycle)
setStatementCacheNumDeferredCloseThreadsback to summary
public void setStatementCacheNumDeferredCloseThreads(int statementCacheNumDeferredCloseThreads)
setTaskRunnerFactoryClassNameback to summary
public void setTaskRunnerFactoryClassName(String taskRunnerFactoryClassName) throws PropertyVetoException
setTestConnectionOnCheckinback to summary
public void setTestConnectionOnCheckin(boolean testConnectionOnCheckin)
setTestConnectionOnCheckoutback to summary
public void setTestConnectionOnCheckout(boolean testConnectionOnCheckout)
setUnreturnedConnectionTimeoutback to summary
public void setUnreturnedConnectionTimeout(int unreturnedConnectionTimeout)
setUserOverridesAsStringback to summary
public void setUserOverridesAsString(String userOverridesAsString) throws PropertyVetoException
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object