org.kuali.rice.core.database
Class RiceXADataSource

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
                  extended by org.enhydra.jdbc.standard.StandardXADataSource
                      extended by org.kuali.rice.core.database.RiceXADataSource
All Implemented Interfaces:
Serializable, Wrapper, Referenceable, ObjectFactory, CommonDataSource, ConnectionPoolDataSource, DataSource, XADataSource

public class RiceXADataSource
extends org.enhydra.jdbc.standard.StandardXADataSource

This is a description of what this class does - wliang don't forget to fill this in. Portions of this code were copied from Apache DBCP 1.2.1

Author:
Kuali Rice Team (rice.collab@kuali.org)
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.enhydra.jdbc.standard.StandardXADataSource
connectionCount, deadLockMaxWait, deadLockRetryWait, DEFAULT_DEADLOCKMAXWAIT, DEFAULT_DEADLOCKRETRYWAIT, DEFAULT_MAX_CON, DEFAULT_MIN_CON, maxCon, minCon, transactionManager
 
Fields inherited from class org.enhydra.jdbc.standard.StandardConnectionPoolDataSource
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
RiceXADataSource()
           
 
Method Summary
protected  org.apache.commons.pool.KeyedObjectPoolFactory createStatementPoolFactory()
           
 Connection getConnection(String arg0, String arg1)
           
 org.enhydra.jdbc.standard.StandardXAStatefulConnection getFreeConnection()
           
 int getPreparedStatementCacheSize()
           
 void setPreparedStatementCacheSize(int preparedStmtCacheSize)
           
 void setPreparedStmtCacheSize(int preparedStmtCacheSize)
          This method calls setPreparedStatementCacheSize(int) instead of setting this property.
protected  PreparedStatementCachingConnection wrapConnection(Connection realConnection)
           
 
Methods inherited from class org.enhydra.jdbc.standard.StandardXADataSource
closeFreeConnection, dump, freeConnection, getAllConnections, getConnectionCount, getDeadLockMaxWait, getDeadLockRetryWait, getMaxCon, getMinCon, getTransactionManager, getXAConnection, getXAConnection, getXidConnections, getXidCount, processToWait, setDeadLockMaxWait, setDeadLockRetryWait, setDriverName, setMaxCon, setMinCon, setPassword, setTransactionManager, setUrl, setUser, toString
 
Methods inherited from class org.enhydra.jdbc.standard.StandardConnectionPoolDataSource
getMasterPrepStmtCache, getPooledConnection, getPooledConnection, getPreparedStmtCacheSize
 
Methods inherited from class org.enhydra.jdbc.standard.StandardDataSource
equals, getConnection, getDriverName, getObjectInstance, getReference, getTransactionIsolation, getUrl, hashCode, setTransactionIsolation
 
Methods inherited from class org.enhydra.jdbc.core.CoreDataSource
getDescription, getLoginTimeout, getLogWriter, getPassword, getThreadFactory, getUser, isDebug, isVerbose, setDebug, setDescription, setLoginTimeout, setLogWriter, setThreadFactory, 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
 

Constructor Detail

RiceXADataSource

public RiceXADataSource()
Method Detail

getConnection

public Connection getConnection(String arg0,
                                String arg1)
                         throws SQLException
Specified by:
getConnection in interface DataSource
Overrides:
getConnection in class org.enhydra.jdbc.standard.StandardDataSource
Throws:
SQLException

getFreeConnection

public org.enhydra.jdbc.standard.StandardXAStatefulConnection getFreeConnection()
                                                                         throws SQLException
Overrides:
getFreeConnection in class org.enhydra.jdbc.standard.StandardXADataSource
Throws:
SQLException

getPreparedStatementCacheSize

public int getPreparedStatementCacheSize()

setPreparedStatementCacheSize

public void setPreparedStatementCacheSize(int preparedStmtCacheSize)

setPreparedStmtCacheSize

public void setPreparedStmtCacheSize(int preparedStmtCacheSize)
This method calls setPreparedStatementCacheSize(int) instead of setting this property. The reason 2 properties exist is because preparedStmtCacheSize is used by XAPool to enable PreparedStatement caching, but its implementation seems to cause max cursors to be exceeded under oracle. Therefore, this class defines a new property, preparedStatementCacheSize, that will instead be used to turn on caching

Overrides:
setPreparedStmtCacheSize in class org.enhydra.jdbc.standard.StandardConnectionPoolDataSource
See Also:
StandardConnectionPoolDataSource.setPreparedStmtCacheSize(int)

createStatementPoolFactory

protected org.apache.commons.pool.KeyedObjectPoolFactory createStatementPoolFactory()

wrapConnection

protected PreparedStatementCachingConnection wrapConnection(Connection realConnection)


Copyright © 2004-2011 The Kuali Foundation. All Rights Reserved.