org.enhydra.jdbc.standard
Class StandardConnectionPoolDataSource

java.lang.Object
  extended by org.enhydra.jdbc.util.JdbcUtil
      extended by org.enhydra.jdbc.core.CoreDataSource
          extended by org.enhydra.jdbc.standard.StandardDataSource
              extended by org.enhydra.jdbc.standard.StandardConnectionPoolDataSource
All Implemented Interfaces:
java.io.Serializable, java.sql.Wrapper, javax.naming.Referenceable, javax.naming.spi.ObjectFactory, javax.sql.CommonDataSource, javax.sql.ConnectionPoolDataSource, javax.sql.DataSource
Direct Known Subclasses:
InformixConnectionPoolDataSource, StandardXADataSource, SybaseConnectionPoolDataSource

public class StandardConnectionPoolDataSource
extends StandardDataSource
implements javax.sql.ConnectionPoolDataSource

A data source used to create generic pooled connections (factory)

See Also:
Serialized Form

Field Summary
static int DEFAULT_PREPAREDSTMTCACHESIZE
           
 
Fields inherited from class org.enhydra.jdbc.core.CoreDataSource
logWriter, password, user
 
Fields inherited from class org.enhydra.jdbc.util.JdbcUtil
log
 
Constructor Summary
StandardConnectionPoolDataSource()
          Constructor.
 
Method Summary
 java.util.Hashtable getMasterPrepStmtCache()
           
 javax.sql.PooledConnection getPooledConnection()
          Create a pooled connection using the default username and password.
 javax.sql.PooledConnection getPooledConnection(java.lang.String user, java.lang.String password)
          Create a standard pooled connection using the supplied username and password.
 int getPreparedStmtCacheSize()
          Gets the size of the prepared statement cache
 void setPreparedStmtCacheSize(int value)
          Sets the size of the prepared statement cache
 java.lang.String toString()
           
 
Methods inherited from class org.enhydra.jdbc.standard.StandardDataSource
equals, getConnection, getConnection, getDriverName, getObjectInstance, getReference, getTransactionIsolation, getUrl, hashCode, setDriverName, setTransactionIsolation, setUrl
 
Methods inherited from class org.enhydra.jdbc.core.CoreDataSource
getDescription, getLoginTimeout, getLogWriter, getPassword, getThreadFactory, getUser, isDebug, isVerbose, setDebug, setDescription, setLoginTimeout, setLogWriter, setPassword, setThreadFactory, setUser, setVerbose, shutdown
 
Methods inherited from class org.enhydra.jdbc.util.JdbcUtil
setLogger
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface javax.sql.CommonDataSource
getLoginTimeout, getLogWriter, setLoginTimeout, setLogWriter
 
Methods inherited from interface java.sql.Wrapper
isWrapperFor, unwrap
 

Field Detail

DEFAULT_PREPAREDSTMTCACHESIZE

public static final int DEFAULT_PREPAREDSTMTCACHESIZE
See Also:
Constant Field Values
Constructor Detail

StandardConnectionPoolDataSource

public StandardConnectionPoolDataSource()
Constructor.

Method Detail

getPooledConnection

public javax.sql.PooledConnection getPooledConnection()
                                               throws java.sql.SQLException
Create a pooled connection using the default username and password.

Specified by:
getPooledConnection in interface javax.sql.ConnectionPoolDataSource
Throws:
java.sql.SQLException

getPooledConnection

public javax.sql.PooledConnection getPooledConnection(java.lang.String user,
                                                      java.lang.String password)
                                               throws java.sql.SQLException
Create a standard pooled connection using the supplied username and password.

Specified by:
getPooledConnection in interface javax.sql.ConnectionPoolDataSource
Throws:
java.sql.SQLException

getMasterPrepStmtCache

public java.util.Hashtable getMasterPrepStmtCache()

getPreparedStmtCacheSize

public int getPreparedStmtCacheSize()
Gets the size of the prepared statement cache


setPreparedStmtCacheSize

public void setPreparedStmtCacheSize(int value)
Sets the size of the prepared statement cache


toString

public java.lang.String toString()
Overrides:
toString in class StandardDataSource