public class PDataSource extends TdsDataSource implements javax.sql.ConnectionPoolDataSource
MODE_SQLSERVER_65, MODE_SQLSERVER_70, MODE_SQLSERVER_70_ASCII
Constructor and Description |
---|
PDataSource()
Create an empty DataSource.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj)
Compares this ConnectionPoolDataSource to the specified object.
|
java.sql.Connection |
getConnection()
override the method in TdsDataSource.
|
java.sql.Connection |
getConnection(java.lang.String username,
java.lang.String password)
override the method in TdsDataSource.
|
java.lang.String |
getFailoverListener()
Returns the value of the property failoverListener.
|
int |
getInitialPoolSize()
Get the number of physical connections the pool
should contain when it is created.
|
int |
getMaxIdleTime()
Get the number of seconds that a physical connection
should remain unused in the pool before the
connection is closed. 0 (zero) indicates no limit.
|
int |
getMaxPoolSize()
Get the maximum number of physical connections that
the pool should contain. 0 (zero) indicates no
maximum size.
|
int |
getMaxStatements()
Get the total number of statements that the pool should
keep open. 0 (zero) indicates that caching of
statements is disabled.
|
int |
getMinPoolSize()
Get the number of physical connections the pool
should keep available at all times. 0 (zero) indicates
that connections should be created as needed.
|
javax.sql.PooledConnection |
getPooledConnection()
This method creates a real connection to the SQL Server with the parameter of this
DataSource.
|
javax.sql.PooledConnection |
getPooledConnection(java.lang.String user,
java.lang.String password)
This method creates a real connection to the SQL Server with the parameter of this
DataSource.
|
int |
getPropertyCycle()
Get the interval, in seconds, that the pool should wait
before enforcing the current policy defined by the
values of the above connection pool properties.
|
int |
getTotalTimeOfAttempts()
Returns the value of the property totalTimeOfAttempts.
|
boolean |
getUseDefaultFailoverListener()
Returns the value of the property useDefaultFailoverListener.
|
int |
getWaitTimeToNextAttempt()
Returns the value of the property waitTimeToNextAttempt.
|
void |
setFailoverListener(java.lang.String failoverListener)
Sets the property failoverListener.
|
void |
setInitialPoolSize(int initialPoolSize)
Set the number of physical connections the pool
should contain when it is created.
|
void |
setMaxIdleTime(int maxIdleTime)
Set the number of seconds that a physical connection
should remain unused in the pool before the
connection is closed. 0 (zero) indicates no limit.
|
void |
setMaxPoolSize(int maxPoolSize)
Set the maximum number of physical connections that
the pool should contain. 0 (zero) indicates no
maximum size.
|
void |
setMaxStatements(int maxStatements)
Set the total number of statements that the pool should
keep open. 0 (zero) indicates that caching of
statements is disabled.
|
void |
setMinPoolSize(int minPoolSize)
Set the number of physical connections the pool
should keep available at all times. 0 (zero) indicates
that connections should be created as needed.
|
void |
setPropertyCycle(int propertyCycle)
Set the interval, in seconds, that the pool should wait
before enforcing the current policy defined by the
values of the above connection pool properties.
|
void |
setTotalTimeOfAttempts(int totalTimeOfAttempts)
Sets the property totalTimeOfAttempts.
|
void |
setUseDefaultFailoverListener(boolean useDefaultFailoverListener)
Sets the property useDefaultFailoverListener.
|
void |
setWaitTimeToNextAttempt(int waitTimeToNextAttempt)
Sets the property waitTimeToNextAttempt.
|
clone, getAppname, getCharset, getDatabaseName, getDescription, getDstsave, getFailover, getFailoverInstanceName, getFailoverPort, getFailoverServerName, getFetchsize, getFulltran, getImpltran, getInitSQL, getInstanceName, getLanguage, getLastUpdateCount, getLoginTimeout, getLogWriter, getMode, getPacketSize, getPassword, getPort, getPortNumber, getPrepare, getPrepareLiveTime, getProperties, getProperty, getQueryTimeout, getReference, getResultSetType, getSecureLevel, getServerName, getSqlServer7Mode, getStatusRequest, getUrl, getUseCursorsAlways, getUseInsteadOfTrigger, getUser, getWSID, isMars, setAppname, setCharset, setDatabaseName, setDescription, setDstsave, setFailover, setFailoverInstanceName, setFailoverPort, setFailoverServerName, setFetchsize, setFulltran, setFulltran, setImpltran, setImpltran, setInitSQL, setInstanceName, setLanguage, setLastUpdateCount, setLogging, setLoginTimeout, setLogWriter, setMars, setMode, setPacketSize, setPassword, setPort, setPortNumber, setPrepare, setPrepareLiveTime, setProperties, setProperty, setProperty, setProperty, setQueryTimeout, setResultSetType, setSecureLevel, setServerName, setSqlServer7Mode, setStatusRequest, setUrl, setUseCursorsAlways, setUseInsteadOfTrigger, setUser, setWSID, toString
acceptsURL, connect, getMajorVersion, getMinorVersion, getPropertyInfo, jdbcCompliant, run
getClass, hashCode, notify, notifyAll, wait, wait, wait
public java.sql.Connection getConnection() throws java.sql.SQLException
getConnection
in interface javax.sql.DataSource
getConnection
in class TdsDataSource
java.sql.SQLException
- if a database-access error occurs.TdsDataSource.getConnection()
public java.sql.Connection getConnection(java.lang.String username, java.lang.String password) throws java.sql.SQLException
getConnection
in interface javax.sql.DataSource
getConnection
in class TdsDataSource
username
- password
- java.sql.SQLException
- if a database-access error occurs.TdsDataSource.getConnection(String,String)
public javax.sql.PooledConnection getPooledConnection() throws java.sql.SQLException
getPooledConnection
in interface javax.sql.ConnectionPoolDataSource
java.sql.SQLException
- if a database-access error occurs.public javax.sql.PooledConnection getPooledConnection(java.lang.String user, java.lang.String password) throws java.sql.SQLException
getPooledConnection
in interface javax.sql.ConnectionPoolDataSource
user
- the database user on whose behalf the Connection is being made.password
- the user's password.java.sql.SQLException
- if a database-access error occurs.public boolean equals(java.lang.Object obj)
equals
in class TdsDataSource
obj
- the object to compare.public void setMaxStatements(int maxStatements)
An application server managing a pool of PooledConnection objects uses these properties to determine how to manage its pool. i-net PLEXA and the method getConnection() is not using this property.
getMaxStatements()
public int getMaxStatements()
setMaxStatements(int)
public void setInitialPoolSize(int initialPoolSize)
i-net PLEXA(tm) and the method getConnection() use this property.
getInitialPoolSize()
public int getInitialPoolSize()
setInitialPoolSize(int)
public void setMinPoolSize(int minPoolSize)
i-net PLEXA(tm) and the method getConnection() use this property.
getMinPoolSize()
public int getMinPoolSize()
setMinPoolSize(int)
public void setMaxPoolSize(int maxPoolSize)
i-net PLEXA(tm) and the method getConnection() use this property.
getMaxPoolSize()
,
PoolManager.setMaxPoolSize(int)
public int getMaxPoolSize()
setMaxPoolSize(int)
public void setMaxIdleTime(int maxIdleTime)
i-net PLEXA(tm) and the method getConnection() use this property.
getMaxIdleTime()
,
PoolManager.setMaxIdleTime(int)
public int getMaxIdleTime()
setMaxIdleTime(int)
public void setPropertyCycle(int propertyCycle)
An application server managing a pool of PooledConnection objects uses these properties to determine how to manage its pool. i-net PLEXA(tm) and the method getConnection() do not use this property.
getPropertyCycle()
public int getPropertyCycle()
setPropertyCycle(int)
public void setUseDefaultFailoverListener(boolean useDefaultFailoverListener)
useDefaultFailoverListener
- the value for the property useDefaultFailoverListener.public void setWaitTimeToNextAttempt(int waitTimeToNextAttempt)
waitTimeToNextAttempt
- the value for the property waitTimeToNextAttempt.public void setTotalTimeOfAttempts(int totalTimeOfAttempts)
totalTimeOfAttempts
- the value for the property totalTimeOfAttempts.public void setFailoverListener(java.lang.String failoverListener)
com.inet.pool.FailoverListener
failoverListener
- the value for the property failoverListener.public boolean getUseDefaultFailoverListener()
public int getWaitTimeToNextAttempt()
public int getTotalTimeOfAttempts()
public java.lang.String getFailoverListener()
copyright by i-net software