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:
Serializable, Wrapper, Referenceable, ObjectFactory, CommonDataSource, ConnectionPoolDataSource, DataSource
Direct Known Subclasses:
InformixConnectionPoolDataSource, StandardXADataSource, SybaseConnectionPoolDataSource

public class StandardConnectionPoolDataSource
extends StandardDataSource
implements 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
 Hashtable getMasterPrepStmtCache()
           
 PooledConnection getPooledConnection()
          Create a pooled connection using the default username and password.
 PooledConnection getPooledConnection(String user, 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
 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 PooledConnection getPooledConnection()
                                     throws SQLException
Create a pooled connection using the default username and password.

Specified by:
getPooledConnection in interface ConnectionPoolDataSource
Throws:
SQLException

getPooledConnection

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

Specified by:
getPooledConnection in interface ConnectionPoolDataSource
Throws:
SQLException

getMasterPrepStmtCache

public 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 String toString()
Overrides:
toString in class StandardDataSource


Copyright © 2011. All Rights Reserved.