Package org.logicalcobwebs.proxool
Class ProxoolDataSource
- java.lang.Object
-
- org.logicalcobwebs.proxool.ProxoolDataSource
-
- All Implemented Interfaces:
java.sql.Wrapper
,javax.naming.spi.ObjectFactory
,javax.sql.CommonDataSource
,javax.sql.DataSource
public class ProxoolDataSource extends java.lang.Object implements javax.sql.DataSource, javax.naming.spi.ObjectFactory
The Proxool DataSource implementation. Supports three modes of configuration:- pre-configured
- bean-configured
- factory-configured
- Since:
- Proxool 0.9
- Version:
- $Revision: 1.11 $, $Date: 2007/12/14 23:03:28 $
- Author:
- bill, $Author: billhorsman $ (current maintainer)
-
-
Constructor Summary
Constructors Constructor Description ProxoolDataSource()
ProxoolDataSource(java.lang.String alias)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getAlias()
java.sql.Connection
getConnection()
java.sql.Connection
getConnection(java.lang.String s, java.lang.String s1)
java.lang.String
getDriver()
java.lang.String
getDriverUrl()
java.lang.String
getFatalSqlExceptionsAsString()
java.lang.String
getFatalSqlExceptionWrapperClass()
long
getHouseKeepingSleepTime()
java.lang.String
getHouseKeepingTestSql()
java.lang.String
getJmxAgentId()
int
getLoginTimeout()
java.io.PrintWriter
getLogWriter()
long
getMaximumActiveTime()
int
getMaximumConnectionCount()
long
getMaximumConnectionLifetime()
int
getMinimumConnectionCount()
java.lang.Object
getObjectInstance(java.lang.Object refObject, javax.naming.Name name, javax.naming.Context context, java.util.Hashtable hashtable)
long
getOverloadWithoutRefusalLifetime()
java.util.logging.Logger
getParentLogger()
java.lang.String
getPassword()
int
getPrototypeCount()
long
getRecentlyStartedThreshold()
int
getSimultaneousBuildThrottle()
java.lang.String
getStatistics()
java.lang.String
getStatisticsLogLevel()
java.lang.String
getUser()
boolean
isJmx()
boolean
isTestAfterUse()
boolean
isTestBeforeUse()
boolean
isTrace()
boolean
isVerbose()
boolean
isWrapperFor(java.lang.Class<?> iface)
void
setAlias(java.lang.String alias)
void
setDelegateProperties(java.lang.String properties)
Set any property that should be handed to the delegate driver.void
setDriver(java.lang.String driver)
void
setDriverUrl(java.lang.String url)
void
setFatalSqlExceptionsAsString(java.lang.String fatalSqlExceptionsAsString)
void
setFatalSqlExceptionWrapperClass(java.lang.String fatalSqlExceptionWrapperClass)
void
setHouseKeepingSleepTime(int houseKeepingSleepTime)
void
setHouseKeepingTestSql(java.lang.String houseKeepingTestSql)
void
setJmx(boolean jmx)
void
setJmxAgentId(java.lang.String jmxAgentId)
void
setLoginTimeout(int loginTimeout)
void
setLogWriter(java.io.PrintWriter logWriter)
void
setMaximumActiveTime(long maximumActiveTime)
void
setMaximumConnectionCount(int maximumConnectionCount)
void
setMaximumConnectionLifetime(int maximumConnectionLifetime)
void
setMinimumConnectionCount(int minimumConnectionCount)
void
setOverloadWithoutRefusalLifetime(int overloadWithoutRefusalLifetime)
void
setPassword(java.lang.String password)
void
setPrototypeCount(int prototypeCount)
void
setRecentlyStartedThreshold(int recentlyStartedThreshold)
void
setSimultaneousBuildThrottle(int simultaneousBuildThrottle)
void
setStatistics(java.lang.String statistics)
void
setStatisticsLogLevel(java.lang.String statisticsLogLevel)
void
setTestAfterUse(boolean testAfterUse)
void
setTestBeforeUse(boolean testBeforeUse)
void
setTrace(boolean trace)
void
setUser(java.lang.String user)
void
setVerbose(boolean verbose)
<T> T
unwrap(java.lang.Class<T> iface)
-
-
-
Method Detail
-
getConnection
public java.sql.Connection getConnection() throws java.sql.SQLException
- Specified by:
getConnection
in interfacejavax.sql.DataSource
- Throws:
java.sql.SQLException
- See Also:
DataSource.getConnection()
-
getObjectInstance
public java.lang.Object getObjectInstance(java.lang.Object refObject, javax.naming.Name name, javax.naming.Context context, java.util.Hashtable hashtable) throws java.lang.Exception
- Specified by:
getObjectInstance
in interfacejavax.naming.spi.ObjectFactory
- Throws:
java.lang.Exception
-
getAlias
public java.lang.String getAlias()
- See Also:
ConnectionPoolDefinitionIF.getAlias()
-
setAlias
public void setAlias(java.lang.String alias)
- See Also:
ConnectionPoolDefinitionIF.getAlias()
-
getDriverUrl
public java.lang.String getDriverUrl()
- See Also:
ConnectionPoolDefinitionIF.getUrl()
-
setDriverUrl
public void setDriverUrl(java.lang.String url)
- See Also:
ConnectionPoolDefinitionIF.getUrl()
-
getDriver
public java.lang.String getDriver()
- See Also:
ConnectionPoolDefinitionIF.getDriver()
-
setDriver
public void setDriver(java.lang.String driver)
- See Also:
ConnectionPoolDefinitionIF.getDriver()
-
getMaximumConnectionLifetime
public long getMaximumConnectionLifetime()
-
setMaximumConnectionLifetime
public void setMaximumConnectionLifetime(int maximumConnectionLifetime)
-
getPrototypeCount
public int getPrototypeCount()
-
setPrototypeCount
public void setPrototypeCount(int prototypeCount)
-
getMinimumConnectionCount
public int getMinimumConnectionCount()
-
setMinimumConnectionCount
public void setMinimumConnectionCount(int minimumConnectionCount)
-
getMaximumConnectionCount
public int getMaximumConnectionCount()
-
setMaximumConnectionCount
public void setMaximumConnectionCount(int maximumConnectionCount)
-
getHouseKeepingSleepTime
public long getHouseKeepingSleepTime()
-
setHouseKeepingSleepTime
public void setHouseKeepingSleepTime(int houseKeepingSleepTime)
-
getSimultaneousBuildThrottle
public int getSimultaneousBuildThrottle()
-
setSimultaneousBuildThrottle
public void setSimultaneousBuildThrottle(int simultaneousBuildThrottle)
-
getRecentlyStartedThreshold
public long getRecentlyStartedThreshold()
-
setRecentlyStartedThreshold
public void setRecentlyStartedThreshold(int recentlyStartedThreshold)
-
getOverloadWithoutRefusalLifetime
public long getOverloadWithoutRefusalLifetime()
-
setOverloadWithoutRefusalLifetime
public void setOverloadWithoutRefusalLifetime(int overloadWithoutRefusalLifetime)
-
getMaximumActiveTime
public long getMaximumActiveTime()
-
setMaximumActiveTime
public void setMaximumActiveTime(long maximumActiveTime)
-
isVerbose
public boolean isVerbose()
- See Also:
ConnectionPoolDefinitionIF.isVerbose()
-
setVerbose
public void setVerbose(boolean verbose)
- See Also:
ConnectionPoolDefinitionIF.isVerbose()
-
isTrace
public boolean isTrace()
- See Also:
ConnectionPoolDefinitionIF.isTrace()
-
setTrace
public void setTrace(boolean trace)
- See Also:
ConnectionPoolDefinitionIF.isTrace()
-
getStatistics
public java.lang.String getStatistics()
-
setStatistics
public void setStatistics(java.lang.String statistics)
-
getStatisticsLogLevel
public java.lang.String getStatisticsLogLevel()
-
setStatisticsLogLevel
public void setStatisticsLogLevel(java.lang.String statisticsLogLevel)
-
getFatalSqlExceptionsAsString
public java.lang.String getFatalSqlExceptionsAsString()
-
setFatalSqlExceptionsAsString
public void setFatalSqlExceptionsAsString(java.lang.String fatalSqlExceptionsAsString)
-
getFatalSqlExceptionWrapperClass
public java.lang.String getFatalSqlExceptionWrapperClass()
-
setFatalSqlExceptionWrapperClass
public void setFatalSqlExceptionWrapperClass(java.lang.String fatalSqlExceptionWrapperClass)
-
getHouseKeepingTestSql
public java.lang.String getHouseKeepingTestSql()
-
setHouseKeepingTestSql
public void setHouseKeepingTestSql(java.lang.String houseKeepingTestSql)
-
getUser
public java.lang.String getUser()
- See Also:
ConnectionPoolDefinitionIF.getUser()
-
setUser
public void setUser(java.lang.String user)
- See Also:
ConnectionPoolDefinitionIF.getUser()
-
getPassword
public java.lang.String getPassword()
- See Also:
ConnectionPoolDefinitionIF.getPassword()
-
setPassword
public void setPassword(java.lang.String password)
- See Also:
ConnectionPoolDefinitionIF.getPassword()
-
isJmx
public boolean isJmx()
- See Also:
ConnectionPoolDefinitionIF.isJmx()
-
setJmx
public void setJmx(boolean jmx)
- See Also:
ConnectionPoolDefinitionIF.isJmx()
-
getJmxAgentId
public java.lang.String getJmxAgentId()
-
setJmxAgentId
public void setJmxAgentId(java.lang.String jmxAgentId)
-
isTestBeforeUse
public boolean isTestBeforeUse()
-
setTestBeforeUse
public void setTestBeforeUse(boolean testBeforeUse)
-
isTestAfterUse
public boolean isTestAfterUse()
-
setTestAfterUse
public void setTestAfterUse(boolean testAfterUse)
-
setDelegateProperties
public void setDelegateProperties(java.lang.String properties)
Set any property that should be handed to the delegate driver. E.g.foo=1,bar=true
- Parameters:
properties
- a comma delimited list of name=value pairs- See Also:
ConnectionPoolDefinitionIF.getDelegateProperties()
-
getLogWriter
public java.io.PrintWriter getLogWriter() throws java.sql.SQLException
- Specified by:
getLogWriter
in interfacejavax.sql.CommonDataSource
- Specified by:
getLogWriter
in interfacejavax.sql.DataSource
- Throws:
java.sql.SQLException
-
getLoginTimeout
public int getLoginTimeout() throws java.sql.SQLException
- Specified by:
getLoginTimeout
in interfacejavax.sql.CommonDataSource
- Specified by:
getLoginTimeout
in interfacejavax.sql.DataSource
- Throws:
java.sql.SQLException
-
setLogWriter
public void setLogWriter(java.io.PrintWriter logWriter) throws java.sql.SQLException
- Specified by:
setLogWriter
in interfacejavax.sql.CommonDataSource
- Specified by:
setLogWriter
in interfacejavax.sql.DataSource
- Throws:
java.sql.SQLException
-
setLoginTimeout
public void setLoginTimeout(int loginTimeout) throws java.sql.SQLException
- Specified by:
setLoginTimeout
in interfacejavax.sql.CommonDataSource
- Specified by:
setLoginTimeout
in interfacejavax.sql.DataSource
- Throws:
java.sql.SQLException
-
getConnection
public java.sql.Connection getConnection(java.lang.String s, java.lang.String s1) throws java.sql.SQLException
- Specified by:
getConnection
in interfacejavax.sql.DataSource
- Throws:
java.sql.SQLException
-
unwrap
public <T> T unwrap(java.lang.Class<T> iface) throws java.sql.SQLException
- Specified by:
unwrap
in interfacejava.sql.Wrapper
- Throws:
java.sql.SQLException
-
isWrapperFor
public boolean isWrapperFor(java.lang.Class<?> iface) throws java.sql.SQLException
- Specified by:
isWrapperFor
in interfacejava.sql.Wrapper
- Throws:
java.sql.SQLException
-
getParentLogger
public java.util.logging.Logger getParentLogger() throws java.sql.SQLFeatureNotSupportedException
- Specified by:
getParentLogger
in interfacejavax.sql.CommonDataSource
- Throws:
java.sql.SQLFeatureNotSupportedException
-
-