com.evermind.sql
Class OrionPooledDataSource


java.lang.Object

  |

  +--com.evermind.sql.OrionPooledDataSource

All Implemented Interfaces:
javax.sql.DataSource, com.evermind.util.LoggingDestroyable, java.lang.Runnable, java.io.Serializable
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

Inner Class Summary
 class OrionPooledDataSource.User
          User
 
Constructor Summary
OrionPooledDataSource()
           
OrionPooledDataSource(javax.sql.ConnectionPoolDataSource source)
           
OrionPooledDataSource(javax.sql.DataSource source)
           
 
Method Summary
 void checkIntegrity()
           
 void destroy(com.evermind.util.Logger logger)
           
 int getCachedConnections()
           
 java.sql.Connection getConnection()
           
 java.sql.Connection getConnection(java.lang.String username, java.lang.String password)
           
 java.lang.String getLocation()
           
 int getLoginTimeout()
           
 java.io.PrintWriter getLogWriter()
           
 int getOpenConnections()
           
 com.evermind.sql.PooledConnectionUsage getPooledInstance()
           
 com.evermind.sql.PooledConnectionUsage getPooledInstance(java.lang.String username, java.lang.String password)
           
 com.evermind.server.administration.DataSourceRuntimeInfo getRuntimeInfo()
           
 int getUsedConnections()
           
 OrionPooledDataSource getUserSource(java.lang.String username, java.lang.String password)
           
 void removeCache()
           
 void run()
           
 void setAutoCommit(boolean autoCommit)
           
 void setConnectionRetryInterval(long interval)
           
 void setDataSource(javax.sql.ConnectionPoolDataSource source)
           
 void setDataSourceName(java.lang.String name)
           
 void setLocation(java.lang.String location)
           
 void setLoginTimeout(int loginTimeout)
           
 void setLogWriter(java.io.PrintWriter writer)
           
 void setMaxConnectionAttempts(int attempts)
           
 void setMaxConnections(int maxConnections)
           
 void setMinConnections(int minConnections)
           
 void setPassword(java.lang.String password)
           
 void setTimeout(int timeout)
           
 void setUsername(java.lang.String username)
           
 void setWaitTimeout(long timeout)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

OrionPooledDataSource


public OrionPooledDataSource()

OrionPooledDataSource


public OrionPooledDataSource(javax.sql.DataSource source)

OrionPooledDataSource


public OrionPooledDataSource(javax.sql.ConnectionPoolDataSource source)
Method Detail

setWaitTimeout


public void setWaitTimeout(long timeout)

setDataSource


public void setDataSource(javax.sql.ConnectionPoolDataSource source)

getLoginTimeout


public int getLoginTimeout()
Specified by:
getLoginTimeout in interface javax.sql.DataSource

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

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

getPooledInstance


public com.evermind.sql.PooledConnectionUsage getPooledInstance(java.lang.String username,
                                                                java.lang.String password)
                                                         throws java.sql.SQLException

getPooledInstance


public com.evermind.sql.PooledConnectionUsage getPooledInstance()
                                                         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(com.evermind.util.Logger logger)
Specified by:
destroy in interface com.evermind.util.LoggingDestroyable