com.metamatrix.common.jdbc
Class SimplePooledConnectionSource
java.lang.Object
com.metamatrix.common.jdbc.SimplePooledConnectionSource
- All Implemented Interfaces:
- java.sql.Wrapper, javax.sql.CommonDataSource, javax.sql.DataSource
public class SimplePooledConnectionSource
- extends java.lang.Object
- implements javax.sql.DataSource
Simple pooling built on JDBCUtil. Not compatible with DataSources, etc.
Added due to poor 1.6 support among common connection pool implementations.
TODO: Should be switched to proxool or some implementation
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
WAIT_TIME_FOR_RESOURCE
public static final java.lang.String WAIT_TIME_FOR_RESOURCE
- See Also:
- Constant Field Values
MAXIMUM_RESOURCE_POOL_SIZE
public static final java.lang.String MAXIMUM_RESOURCE_POOL_SIZE
- See Also:
- Constant Field Values
RESOURCE_TEST_INTERVAL
public static final java.lang.String RESOURCE_TEST_INTERVAL
- See Also:
- Constant Field Values
SimplePooledConnectionSource
public SimplePooledConnectionSource(java.util.Properties p)
getConnection
public java.sql.Connection getConnection()
throws java.sql.SQLException
- Specified by:
getConnection
in interface javax.sql.DataSource
- Throws:
java.sql.SQLException
createConnection
protected java.sql.Connection createConnection()
throws MetaMatrixException
- Throws:
MetaMatrixException
shutDown
public void shutDown()
getConnection
public java.sql.Connection getConnection(java.lang.String username,
java.lang.String password)
throws java.sql.SQLException
- Specified by:
getConnection
in interface javax.sql.DataSource
- Throws:
java.sql.SQLException
getLogWriter
public java.io.PrintWriter getLogWriter()
throws java.sql.SQLException
- Specified by:
getLogWriter
in interface javax.sql.CommonDataSource
- Throws:
java.sql.SQLException
getLoginTimeout
public int getLoginTimeout()
throws java.sql.SQLException
- Specified by:
getLoginTimeout
in interface javax.sql.CommonDataSource
- Throws:
java.sql.SQLException
setLogWriter
public void setLogWriter(java.io.PrintWriter arg0)
throws java.sql.SQLException
- Specified by:
setLogWriter
in interface javax.sql.CommonDataSource
- Throws:
java.sql.SQLException
setLoginTimeout
public void setLoginTimeout(int arg0)
throws java.sql.SQLException
- Specified by:
setLoginTimeout
in interface javax.sql.CommonDataSource
- Throws:
java.sql.SQLException
isWrapperFor
public boolean isWrapperFor(java.lang.Class<?> arg0)
throws java.sql.SQLException
- Specified by:
isWrapperFor
in interface java.sql.Wrapper
- Throws:
java.sql.SQLException
unwrap
public <T> T unwrap(java.lang.Class<T> arg0)
throws java.sql.SQLException
- Specified by:
unwrap
in interface java.sql.Wrapper
- Throws:
java.sql.SQLException
Copyright © 2009. All Rights Reserved.