|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.torque.pool.TorqueClassicDataSource
Torque's default connection pool DataSource
Field Summary | |
private int |
connectionWaitTimeout
Deprecated. time to wait when initiating a connection for the database to respond |
private javax.sql.ConnectionPoolDataSource |
cpds
Deprecated. Pool Data Source that is used to fetch connections |
private static int |
cpdsCounter
Deprecated. Counter used to create an internal unique name od the Data Source |
private java.lang.String |
dataSourceName
Deprecated. DataSource Name used to find the ConnectionPoolDataSource |
private boolean |
defaultAutoCommit
Deprecated. Do connections from this pool are auto-committing? |
private int |
defaultMaxConnections
Deprecated. Maximum Number of Connections cached in this Data Source |
private boolean |
defaultReadOnly
Deprecated. Are connections from this pool read-only? |
private java.lang.String |
description
Deprecated. Description |
private java.util.Properties |
jndiEnvironment
Deprecated. Environment that may be used to set up a jndi initial context. |
private int |
logInterval
Deprecated. Interval (in seconds) that the monitor thread reports the pool state |
private int |
loginTimeout
Deprecated. Login TimeOut in seconds |
private java.io.PrintWriter |
logWriter
Deprecated. Log stream |
private int |
maxExpiryTime
Deprecated. Maximum lifetime of a database connection |
private java.util.Properties |
perUserMaxConnections
Deprecated. Maximum Number of Connections for a specified User in this Data Source |
private static java.util.Map |
pools
Deprecated. Pools keyed by username. |
Constructor Summary | |
TorqueClassicDataSource()
Deprecated. Default no-arg constructor for Serialization |
Method Summary | |
java.sql.Connection |
getConnection()
Deprecated. Attempt to establish a database connection. |
java.sql.Connection |
getConnection(java.lang.String username,
java.lang.String password)
Deprecated. Attempt to establish a database connection. |
javax.sql.ConnectionPoolDataSource |
getConnectionPoolDataSource()
Deprecated. Get the value of connectionPoolDataSource. |
int |
getConnectionWaitTimeout()
Deprecated. Get the amount of time (in seconds) a connection request will have to wait before a time out occurs and an error is thrown. |
java.lang.String |
getDataSourceName()
Deprecated. Get the name of the ConnectionPoolDataSource which backs this pool. |
int |
getDefaultMaxConnections()
Deprecated. Get the number of database connections to cache per user. |
java.lang.String |
getDescription()
Deprecated. Get the description. |
java.lang.String |
getJndiEnvironment(java.lang.String key)
Deprecated. Get the value of jndiEnvironment which is used when instantiating a jndi InitialContext. |
private java.lang.String |
getKey(java.lang.String suffix)
Deprecated. |
int |
getLogInterval()
Deprecated. Get the interval (in seconds) between which the ConnectionPool logs the status of it's Connections. |
int |
getLoginTimeout()
Deprecated. Gets the maximum time in seconds that this data source can wait while attempting to connect to a database. |
java.io.PrintWriter |
getLogWriter()
Deprecated. Use correct debugging and logging code from Log4j |
int |
getMaxExpiryTime()
Deprecated. Get the amount of time (in seconds) that database connections will be cached. |
java.lang.Object |
getObjectInstance(java.lang.Object refObj,
javax.naming.Name name,
javax.naming.Context context,
java.util.Hashtable env)
Deprecated. implements ObjectFactory to create an instance of this class |
java.util.Properties |
getPerUserMaxConnections()
Deprecated. Get the number of database connections to cache per user. |
javax.naming.Reference |
getReference()
Deprecated. Referenceable implementation. |
boolean |
isDefaultAutoCommit()
Deprecated. Get the value of defaultAutoCommit, which defines the state of connections handed out from this pool. |
boolean |
isDefaultReadOnly()
Deprecated. Get the value of defaultReadOnly, which defines the state of connections handed out from this pool. |
private void |
registerPool(java.lang.String username,
java.lang.String password)
Deprecated. |
void |
setConnectionPoolDataSource(javax.sql.ConnectionPoolDataSource v)
Deprecated. Set the backend ConnectionPoolDataSource. |
void |
setConnectionWaitTimeout(int v)
Deprecated. Eet the amount of time (in seconds) a connection request will have to wait before a time out occurs and an error is thrown. |
void |
setDataSourceName(java.lang.String v)
Deprecated. Set the name of the ConnectionPoolDataSource which backs this pool. |
void |
setDefaultAutoCommit(boolean v)
Deprecated. Set the value of defaultAutoCommit, which defines the state of connections handed out from this pool. |
void |
setDefaultMaxConnections(int v)
Deprecated. Set the number of database connections to cache per user. |
void |
setDefaultReadOnly(boolean v)
Deprecated. Set the value of defaultReadOnly, which defines the state of connections handed out from this pool. |
void |
setDescription(java.lang.String v)
Deprecated. Set the description. |
void |
setJndiEnvironment(java.lang.String key,
java.lang.String value)
Deprecated. Set the value of jndiEnvironment which is used when instantiating a jndi InitialContext. |
void |
setLogInterval(int v)
Deprecated. Set the interval (in seconds) between which the ConnectionPool logs the status of it's Connections. |
void |
setLoginTimeout(int seconds)
Deprecated. Sets the maximum time in seconds that this data source will wait while attempting to connect to a database. |
void |
setLogWriter(java.io.PrintWriter out)
Deprecated. Use correct debugging and logging code from Log4j |
void |
setMaxExpiryTime(int v)
Deprecated. Set the amount of time (in seconds) that database connections will be cached. |
void |
setPerUserMaxConnections(java.util.Properties v)
Deprecated. Set the number of database connections to cache per user. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static java.util.Map pools
private static int cpdsCounter
private java.lang.String dataSourceName
private java.lang.String description
private int loginTimeout
private javax.sql.ConnectionPoolDataSource cpds
private java.io.PrintWriter logWriter
private java.util.Properties jndiEnvironment
private int defaultMaxConnections
private java.util.Properties perUserMaxConnections
private int maxExpiryTime
private int connectionWaitTimeout
private int logInterval
private boolean defaultAutoCommit
private boolean defaultReadOnly
Constructor Detail |
public TorqueClassicDataSource()
Method Detail |
public int getDefaultMaxConnections()
public void setDefaultMaxConnections(int v)
v
- Value to assign to maxConnections.public java.util.Properties getPerUserMaxConnections()
public void setPerUserMaxConnections(java.util.Properties v)
v
- Value to assign to perUserMaxConnections.public int getMaxExpiryTime()
public void setMaxExpiryTime(int v)
v
- Value to assign to expiryTime.public int getConnectionWaitTimeout()
public void setConnectionWaitTimeout(int v)
v
- Value to assign to connectionWaitTimeout.public int getLogInterval()
public void setLogInterval(int v)
v
- Value to assign to logInterval.public boolean isDefaultAutoCommit()
public void setDefaultAutoCommit(boolean v)
v
- Value to assign to defaultAutoCommit.public boolean isDefaultReadOnly()
public void setDefaultReadOnly(boolean v)
v
- Value to assign to defaultReadOnly.public java.lang.String getDataSourceName()
public void setDataSourceName(java.lang.String v)
v
- Value to assign to dataSourceName.public java.lang.String getDescription()
public void setDescription(java.lang.String v)
v
- Value to assign to description.public java.lang.String getJndiEnvironment(java.lang.String key)
key
- environment key
public void setJndiEnvironment(java.lang.String key, java.lang.String value)
key
- environment keyvalue
- Value to assign to jndiEnvironment.public javax.sql.ConnectionPoolDataSource getConnectionPoolDataSource()
public void setConnectionPoolDataSource(javax.sql.ConnectionPoolDataSource v)
v
- Value to assign to connectionPoolDataSource.public java.sql.Connection getConnection() throws java.sql.SQLException
getConnection
in interface javax.sql.DataSource
java.sql.SQLException
public java.sql.Connection getConnection(java.lang.String username, java.lang.String password) throws java.sql.SQLException
getConnection
in interface javax.sql.DataSource
username
- The name of the database user.password
- The password of the database user.
java.sql.SQLException
private java.lang.String getKey(java.lang.String suffix)
suffix
-
private void registerPool(java.lang.String username, java.lang.String password) throws javax.naming.NamingException
username
- The name of the database user.password
- The password of the database user.
javax.naming.NamingException
public int getLoginTimeout()
getLoginTimeout
in interface javax.sql.DataSource
public java.io.PrintWriter getLogWriter()
getLogWriter
in interface javax.sql.DataSource
public void setLoginTimeout(int seconds)
setLoginTimeout
in interface javax.sql.DataSource
seconds
- the login timeoutpublic void setLogWriter(java.io.PrintWriter out)
setLogWriter
in interface javax.sql.DataSource
out
- the log writer to usepublic javax.naming.Reference getReference() throws javax.naming.NamingException
Referenceable
implementation.
getReference
in interface javax.naming.Referenceable
javax.naming.NamingException
public java.lang.Object getObjectInstance(java.lang.Object refObj, javax.naming.Name name, javax.naming.Context context, java.util.Hashtable env) throws java.lang.Exception
getObjectInstance
in interface javax.naming.spi.ObjectFactory
refObj
- name
- context
- env
-
java.lang.Exception
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |