com.solarmetric.rd.jdbc
Class PSCacheDataSource
java.lang.Object
|
+--com.solarmetric.rd.jdbc.DelegatingDataSource
|
+--com.solarmetric.rd.jdbc.ConfigurableDataSource
|
+--com.solarmetric.rd.jdbc.PSCacheDataSource
- All Implemented Interfaces:
- javax.sql.DataSource
- public class PSCacheDataSource
- extends ConfigurableDataSource
Wrapper around an existing DataSource that uses prepared
statement caching. This class is meant to be used around 3rd-party data
sources. If you are using a DataSourceImpl, then plug the
PSCacheConnectionPool into the data source instead, as it will
yield a much higher cache hit rate.
Can be configured with the following properties, in addition to those
in ConfigurableDataSource:
- See Also:
PreparedStatementCache
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
PSCacheDataSource
public PSCacheDataSource(javax.sql.DataSource ds)
- Constructor. Supply wrapped data source.
getMaxCachedStatements
public int getMaxCachedStatements()
setMaxCachedStatements
public void setMaxCachedStatements(int max)
getConnection
public java.sql.Connection getConnection()
throws java.sql.SQLException
- Specified by:
getConnection in interface javax.sql.DataSource- Overrides:
getConnection in class ConfigurableDataSource
java.sql.SQLException
getConnection
public java.sql.Connection getConnection(java.lang.String user,
java.lang.String pass)
throws java.sql.SQLException
- Specified by:
getConnection in interface javax.sql.DataSource- Overrides:
getConnection in class ConfigurableDataSource
java.sql.SQLException
Copyright 2001,2002,2003 SolarMetric, Inc. All Rights Reserved.