Skip navigation links

Oracle® TimesTen In-Memory Database JDBC Extensions Java API Reference
Release 11.2.1

E13083-02


com.timesten.jdbc
Class ObservableConnectionDS

java.lang.Object
  extended by com.timesten.jdbc.JdbcOdbcObject
      extended by com.timesten.jdbc.TimesTenDriverBase
          extended by com.timesten.jdbc.TimesTenDataSource
              extended by com.timesten.jdbc.ObservableConnectionDS

All Implemented Interfaces:
java.io.Serializable, java.sql.Wrapper, javax.sql.CommonDataSource, javax.sql.ConnectionPoolDataSource, javax.sql.DataSource

public class ObservableConnectionDS
extends TimesTenDataSource
implements javax.sql.ConnectionPoolDataSource

An ObservableConnectionDS implements the javax.sql.ConnectionPoolDataSource, which is a factory for PooledConnection objects.

NOTE: TimesTen JDBC driver itself does NOT implement database connection pools. This class merely implements ConnectionPoolDataSource, a standard J2EE interface, which faciliates creation and management of database connection pools per the J2EE standard.

Since:
JDBC 2.0
See Also:
Serialized Form

Constructor Summary
ObservableConnectionDS()
          Creates new ObservableConnectionDS.

 

Method Summary
 int getInitialPoolSize()
          Initial pool size for the connection.
 int getMaxIdleTime()
          Maximum idle time for the connection pool.
 int getMaxPoolSize()
          Maximum pool size for the connection pool.
 int getMaxStatements()
          Returns the the total number of prepared statements that the pool keeps open.
 int getMinPoolSize()
          Minimum pool size for the connection pool.
 javax.sql.PooledConnection getPooledConnection()
          This method is a required part of the ConnectionPoolDataSource interface.
 javax.sql.PooledConnection getPooledConnection(java.lang.String user, java.lang.String password)
          This method is a required part of the ConnectionPoolDataSource interface.
 int getPropertyCycle()
          Property cycle.
 boolean isWrapperFor(java.lang.Class<?> iface)
           
 void setInitialPoolSize(int initialPoolSize)
          Set initial connection pool size.
 void setMaxIdleTime(int maxIdleTime)
          Set maximum idle time for the connection pool.
 void setMaxPoolSize(int maxPoolSize)
          Set maximum pool size for the connection pool.
 void setMaxStatements(int maxStatements)
          Sets the the total number of prepared statements that the pool keeps open.
 void setMinPoolSize(int minPoolSize)
          Set minimum pool size for the connection pool.
 void setPropertyCycle(int propertyCycle)
          Property cycle.
<T> T
unwrap(java.lang.Class<T> iface)
           

 

Methods inherited from class com.timesten.jdbc.TimesTenDataSource
getConnection, getConnection, getDescription, getLoginTimeout, getLogWriter, getOraclePassword, getPassword, getUrl, getUser, setDescription, setLoginTimeout, setLogWriter, setOraclePassword, setPassword, setUrl, setUser

 

Methods inherited from class com.timesten.jdbc.TimesTenDriverBase
getProtocol, getSubName, getSubProtocol, getSubProtocolType, isCSConnection, isDirectConnection

 

Methods inherited from class com.timesten.jdbc.JdbcOdbcObject
BytesToChars, CharsToBytes, CharsToBytes, hexPad, hexPairToInt, hexStringToByteArray, isConnectionBroken, toHex

 

Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Methods inherited from interface javax.sql.CommonDataSource
getLoginTimeout, getLogWriter, setLoginTimeout, setLogWriter

 

Constructor Detail

ObservableConnectionDS

public ObservableConnectionDS()
Creates new ObservableConnectionDS. Currently does nothing because the superclass TimesTenDataSource does everything necessary.

Method Detail

getMaxStatements

public int getMaxStatements()
Returns the the total number of prepared statements that the pool keeps open.

setMaxStatements

public void setMaxStatements(int maxStatements)
Sets the the total number of prepared statements that the pool keeps open. Note, the pool is sized at the time of construction of the pool.

getInitialPoolSize

public int getInitialPoolSize()
Initial pool size for the connection.
Returns:
Initial Connection Pool Size.

setInitialPoolSize

public void setInitialPoolSize(int initialPoolSize)
Set initial connection pool size.
Parameters:
initialPoolSize - Initial pool size for the connection pool.

getMinPoolSize

public int getMinPoolSize()
Minimum pool size for the connection pool.
Returns:
Minimum pool size.

setMinPoolSize

public void setMinPoolSize(int minPoolSize)
Set minimum pool size for the connection pool.
Parameters:
minPoolSize -

getMaxPoolSize

public int getMaxPoolSize()
Maximum pool size for the connection pool.
Returns:
Maximum pool size for the connection pool.

setMaxPoolSize

public void setMaxPoolSize(int maxPoolSize)
Set maximum pool size for the connection pool.
Parameters:
maxPoolSize - Maximum pool size for the connection pool.

getMaxIdleTime

public int getMaxIdleTime()
Maximum idle time for the connection pool.
Returns:
Maximum idle time for the connection pool.

setMaxIdleTime

public void setMaxIdleTime(int maxIdleTime)
Set maximum idle time for the connection pool.
Parameters:
maxIdleTime - Maximum idle time for the connection pool.

getPropertyCycle

public int getPropertyCycle()
Property cycle.
Returns:
Property cycle

setPropertyCycle

public void setPropertyCycle(int propertyCycle)
Property cycle.
Parameters:
propertyCycle - Property cycle.

getPooledConnection

public javax.sql.PooledConnection getPooledConnection()
                                               throws java.sql.SQLException
This method is a required part of the ConnectionPoolDataSource interface. Attempts to establish a physical database connection that can be used as a pooled connection by some connection pool implementation. This is an overloaded method.
Specified by:
getPooledConnection in interface javax.sql.ConnectionPoolDataSource
Returns:
a PooledConnection object that is a physical connection to the database using the properties that this ConnectionPoolDataSource object has set at the time.
Throws:
java.sql.SQLException - if a database access error occurs

getPooledConnection

public javax.sql.PooledConnection getPooledConnection(java.lang.String user,
                                                      java.lang.String password)
                                               throws java.sql.SQLException
This method is a required part of the ConnectionPoolDataSource interface. Attempts to establish a physical database connection that can be used as a pooled connection by some connection pool implementation. This is an overloaded method.
Specified by:
getPooledConnection in interface javax.sql.ConnectionPoolDataSource
Parameters:
user - the database user on whose behalf the connection is being made
password - the user's password
Returns:
a PooledConnection object that is a physical connection to the database using the properties that this ConnectionPoolDataSource object has set at the time.
Throws:
java.sql.SQLException - if a database access error occurs

isWrapperFor

public boolean isWrapperFor(java.lang.Class<?> iface)
                     throws java.sql.SQLException
Specified by:
isWrapperFor in interface java.sql.Wrapper
Overrides:
isWrapperFor in class TimesTenDataSource
Throws:
java.sql.SQLException

unwrap

public <T> T unwrap(java.lang.Class<T> iface)
         throws java.sql.SQLException
Specified by:
unwrap in interface java.sql.Wrapper
Overrides:
unwrap in class TimesTenDataSource
Throws:
java.sql.SQLException

Skip navigation links

Oracle® TimesTen In-Memory Database JDBC Extensions Java API Reference
Release 11.2.1

E13083-02


Copyright © 1999, 2010, Oracle and/or its affiliates. All rights reserved.