|
|
|||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||
java.lang.Object
|
+--com.inet.tds.TdsDriver
|
+--com.inet.tds.TdsDataSource
|
+--com.inet.tds.PDataSource
This class is the implementation of the ConnectionPoolDataSource in the driver i-net OPTA(tm). If you want to learn more about this interface please take a look at Sun website. A sample can be found in the file sample/WithPoolDataSource.java.
| Fields inherited from class com.inet.tds.TdsDataSource |
MODE_SQLSERVER_65, MODE_SQLSERVER_70, MODE_SQLSERVER_70_ASCII |
| Constructor Summary | |
PDataSource()
Create an empty DataSource. |
|
| Method Summary | |
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. |
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. |
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. |
| Methods inherited from class com.inet.tds.TdsDriver |
acceptsURL, connect, getMajorVersion, getMinorVersion, getPropertyInfo, jdbcCompliant, run |
| Methods inherited from class java.lang.Object |
getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface javax.sql.ConnectionPoolDataSource |
getLoginTimeout, getLogWriter, setLoginTimeout, setLogWriter |
| Constructor Detail |
public PDataSource()
| Method Detail |
public java.sql.Connection getConnection()
throws java.sql.SQLException
getConnection in class TdsDataSourcejava.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 class TdsDataSourceusername - 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.ConnectionPoolDataSourcejava.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.ConnectionPoolDataSourceuser - 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 TdsDataSourceobj - 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)
|
|
|||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||