Class weblogic.jdbc.t3.Connection
All Packages  

Class weblogic.jdbc.t3.Connection

java.lang.Object
   |
   +----weblogic.jdbc.t3.Connection

public final class Connection
extends Object
implements Connection
This class contains WebLogic extensions to JDBC that are used to get and set the cacheRow property on a Connection, and a method used to refresh connections obtained from a JDBC connection pool. Only those methods are included here.
Author:
Copyright (c) 1996 by WebLogic, Inc.

Method Index

 o cacheRows()
Returns the current value of the Connection property "weblogic.t3.cacheRows".
 o cacheRows(int)
Sets the value of the Connection property "weblogic.t3.cacheRows".
 o refresh()
Refreshes a JDBC connection from a connection pool.
 o waitOnResources()
Accesses the Oracle oopt() C function to set options in cases where requested resources are not available.

Methods

 o cacheRows
  public int cacheRows()
Returns the current value of the Connection property "weblogic.t3.cacheRows". Caching rows on the WebLogic T3Server can improve client performance.
Returns:
Number of rows to be cached
 o cacheRows
  public void cacheRows(int rows) throws SQLException
Sets the value of the Connection property "weblogic.t3.cacheRows". This property can be set initially as part of the java.util.Property object that is used to construct the Connection. Resetting its value changes the cacheRows property for all subsequent query executes, until the value is changed again.
Parameters:
rows - Number of rows to be cached
Throws: SQLException
if the operation cannot be completed
 o refresh
  public void refresh() throws SQLException
Refreshes a JDBC connection from a connection pool. The connection must be cast as a weblogic.jdbc.t3client.Connection, as in the example:
  ((weblogic.jdbc.t3client.Connection)conn).refresh();
You should use this method after catching a SQLException that indicates that the JDBC connection is no longer functioning. To test the viability of a connection, attempt to execute a statement that cannot fail; for example, in Oracle, you might execute the SQL statement "select 1 from dual".
Throws: SQLException
if the operation cannot be completed
 o waitOnResources
  public void waitOnResources(boolean val)
Use this method to access the Oracle oopt() function for C (see section 4-97 of The OCI Functions for C). The Oracle C function sets options in cases where requested resources are not available; for example, whether to wait for locks.

When the argument to this method is true, this WebLogic extension to JDBC sets this option so that your program will receive an error return code whenever a resource is requested but is unavailable. Use of this method can cause several error return codes while waiting for internal resources that are locked for short durations.

Parameters:
val - True if the connection should wait on resources

All Packages