BEA Logo BEA WebLogic Enterprise Release 5.0

  Corporate Info  |  News  |  Solutions  |  Products  |  Partners  |  Services  |  Events  |  Download  |  How To Buy

 

   WLE Doc Home   |   JDBC & Related Topics   |   Previous   |   Next   |   Contents   |   Index

jdbcKona Extensions to the JDBC 1.22 API

This chapter describes the following jdbcKona extensions to the JDBC API:

For complete details on this JDBC API, refer to the following Web site:

http://www.weblogic.com/docs/classdocs/packages.html#jdbc

If this URL changes and you cannot locate this BEA WebLogic JDBC API, please go to http://e-docs.beasys.com/. On that page, click the link for the BEA WebLogic Server (WLS) Documents or Developer Center. On the WLS page, click the API Reference Manual link. The JDBC classdocs are available from this online document.

Class CallableStatement

Class weblogic.jdbc20.oci734.CallableStatement contains jdbcKona extensions to JDBC to support the use of cursors as parameters in CallableStatement objects.

Note: In the class paths, this section shows oci734 . However, you would use oci804 (HP-UX systems) or oci815 , if you are using Oracle 8.0.4 or Oracle 8.1.5, respectively.

The CallableStatement class:

weblogic.jdbc20.oci734.CallableStatement.getResultSet

Note: In the class paths, this section shows oci734 . However, you would use oci804 (HP-UX systems) or oci815 , if you are using Oracle 8.0.4 or Oracle 8.1.5, respectively.

Synopsis

Returns a ResultSet object from a stored procedure where the specified parameter has been bound to an Oracle cursor. Register the output parameter with the registerOutputParameter method, using java.sql.Types.OTHER as the data type.

Java Mapping

public ResultSet getResultSet(int parameterIndex) throws SQLException

Parameters

parameterIndex

This parameter is an index into the set of parameters for the stored procedure.

Throws

SQLException

This exception is thrown if the operation cannot be completed.

Class Connection

This section describes only the jdbcKona extension to JDBC that accesses the Oracle OCI C Function oopt() . Other information about this class is in the description for class java.sql.Connection . A Connection object is usually constructed as a java.sql.Connection class. To use this extension to JDBC, you must explicitly cast your Connection object as a weblogic.jdbc20.oci734.Connection class.

Note: In the class paths, this section shows oci734 . However, you would use oci804 (HP-UX systems) or oci815 , if you are using Oracle 8.0.4 or Oracle 8.1.5, respectively.

The public Connection class:

weblogic.jdbc20.oci734.Connection.waitOnResources

Note: In the class paths, this section shows oci734 . However, you would use oci804 (HP-UX systems) or oci815 , if you are using Oracle 8.0.4 or Oracle 8.1.5, respectively.

Synopsis

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 jdbcKona 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.

Java Mapping

public void waitOnResources(boolean val)

Parameters

val

This parameter is set to true if the connection should wait on resources.

Class weblogic.jdbc20.oci734.Statement

Note: In the class paths, this section shows oci734 . However, you would use oci804 (HP-UX systems) or oci815 , if you are using Oracle 8.0.4 or Oracle 8.1.5, respectively.

This class contains jdbcKona extensions to JDBC to support parsing of SQL statements and adjusting of the fetch size. Only those methods are documented here.

The weblogic.jdbc20.oci734.Statement class:

weblogic.jdbc20.oci734.Statement.fetchsize

Note: In the class paths, this section shows oci734 . However, you would use oci804 (HP-UX systems) or oci815 , if you are using Oracle 8.0.4 or Oracle 8.1.5, respectively.

Synopsis

Allows tuning of the size of prefetch array used for Oracle row results. Oracle provides the means to do data prefetch in batches, which decreases network traffic and latency for row requests.

The default batch size is 100. Memory for 100 rows is allocated in the native stack for every query. For queries that need fewer rows, this size can be adjusted appropriately. This saves on the swappable image size of the application and will benefit performance if only as many rows as needed are fetched.

Java Mapping

public void fetchSize(int size)

Parameters

size

This parameter specifies the number of rows to be prefetched.

weblogic.jdbc20.oci734.Statement.parse

Note: In the class paths, this section shows oci734 . However, you would use oci804 (HP-UX systems) or oci815 , if you are using Oracle 8.0.4 or Oracle 8.1.5, respectively.

Synopsis

Allows tuning of the size of prefetch array used for Oracle row results. Oracle provides the means to do data prefetch in batches, which decreases network traffic and latency for row requests.

The default batch size is 100. Memory for 100 rows is allocated in the native stack for every query. For queries that need fewer rows, this size can be adjusted appropriately. This saves on the swappable image size of the application and will benefit performance if only as many rows as needed are fetched.

Java Mapping

public int parse(String sql) throws SQLException

Parameters

sql

This parameter is the SQL statement to be verified.

Throws

SQLException

This exception is thrown if the operation cannot be completed.