com.evermind.sql
Class OrionPooledDataSource
java.lang.Object
com.evermind.sql.OrionPooledDataSource
- All Implemented Interfaces:
- com.evermind.util.LoggingDestroyable, java.io.Serializable, java.lang.Runnable, javax.sql.DataSource
- Direct Known Subclasses:
- OrionCMTDataSource
public class OrionPooledDataSource
- extends java.lang.Object
- implements javax.sql.DataSource, java.io.Serializable, java.lang.Runnable, com.evermind.util.LoggingDestroyable
A DataSource the provides pooled connections. It either acts upon a "true" ConnectionPoolDataSource
implementation provided by a SQL-server vendor or with an internal ConnectionPoolDataSource
implementation of type com.evermind.sql.DriverManagerConnectionPoolDataSource.
- See Also:
- Serialized Form
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
serialVersionUID
public static final long serialVersionUID
- See Also:
- Constant Field Values
OrionPooledDataSource
public OrionPooledDataSource()
OrionPooledDataSource
public OrionPooledDataSource(javax.sql.DataSource source)
OrionPooledDataSource
public OrionPooledDataSource(javax.sql.ConnectionPoolDataSource source)
setWaitTimeout
public void setWaitTimeout(long timeout)
setAlivePollQuery
public void setAlivePollQuery(java.lang.String alivePollQuery)
setDataSource
public void setDataSource(javax.sql.ConnectionPoolDataSource source)
getLoginTimeout
public int getLoginTimeout()
- Specified by:
getLoginTimeout in interface javax.sql.DataSource
setStaleness
public void setStaleness(int staleness)
setLoginTimeout
public void setLoginTimeout(int loginTimeout)
- Specified by:
setLoginTimeout in interface javax.sql.DataSource
getLogWriter
public java.io.PrintWriter getLogWriter()
- Specified by:
getLogWriter in interface javax.sql.DataSource
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
getUserSource
public OrionPooledDataSource getUserSource(java.lang.String username,
java.lang.String password)
getConnection
public java.sql.Connection getConnection()
throws java.sql.SQLException
- Specified by:
getConnection in interface javax.sql.DataSource
- Throws:
java.sql.SQLException
getPooledInstance
public com.evermind.sql.PooledConnectionUsage getPooledInstance(java.lang.String username,
java.lang.String password)
throws java.sql.SQLException
- Throws:
java.sql.SQLException
getPooledInstance
public com.evermind.sql.PooledConnectionUsage getPooledInstance()
throws java.sql.SQLException
- Throws:
java.sql.SQLException
setLogWriter
public void setLogWriter(java.io.PrintWriter writer)
- Specified by:
setLogWriter in interface javax.sql.DataSource
run
public void run()
- Specified by:
run in interface java.lang.Runnable
removeCache
public void removeCache()
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object
setTimeout
public void setTimeout(int timeout)
setMaxConnections
public void setMaxConnections(int maxConnections)
setMinConnections
public void setMinConnections(int minConnections)
setAutoCommit
public void setAutoCommit(boolean autoCommit)
setUsername
public void setUsername(java.lang.String username)
setPassword
public void setPassword(java.lang.String password)
getOpenConnections
public int getOpenConnections()
getCachedConnections
public int getCachedConnections()
getUsedConnections
public int getUsedConnections()
setDataSourceName
public void setDataSourceName(java.lang.String name)
getRuntimeInfo
public com.evermind.server.administration.DataSourceRuntimeInfo getRuntimeInfo()
checkIntegrity
public void checkIntegrity()
setMaxConnectionAttempts
public void setMaxConnectionAttempts(int attempts)
setConnectionRetryInterval
public void setConnectionRetryInterval(long interval)
setLocation
public void setLocation(java.lang.String location)
getLocation
public java.lang.String getLocation()
destroy
public void destroy(Logger logger)
- Specified by:
destroy in interface com.evermind.util.LoggingDestroyable
initialize
public void initialize(com.evermind.server.DataSourceConfig config,
javax.naming.Context context,
java.io.PrintWriter logWriter)
throws java.lang.InstantiationException
- Throws:
java.lang.InstantiationException