|
|
This chapter describes the following jdbcKona extensions to the JDBC API:
Note: In the previous list, oci[version] refers to the Oracle version number (734 , 804 , or 815 ). The samples in this chapter show oci734 . For example:
Class weblogic.jdbc20.oci734.CallableStatement
However, you would use oci804 (HP-UX systems) or oci815 , if you are using Oracle 8.0.4 or Oracle 8.1.5, respectively.
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 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:
Class CallableStatement
java.lang.Object
|
+----weblogic.jdbc20.oci734.Statement
|
+----weblogic.jdbc20.oci734.PreparedStatement
|
+----weblogic.jdbc20.oci734.CallableStatement
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:
- Extends the Object class
- Implements the Connection interface
- Has the following inheritance hierarchy:
java.lang.Object
|
+----weblogic.jdbc20.oci734.Connection
- Has the waitOnResources method
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:
- Extends the Object base class
- Has the following inheritance hierarchy:
java.lang.Object
|
+----weblogic.jdbc20.oci734.Statement
- Has the following methods:
- fetchsize
- 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 void fetchSize(int size)
Parameters
- size
- This parameter specifies the number of rows to be prefetched.
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.
Copyright © 1999 BEA Systems, Inc. All rights reserved.
Required browser: Netscape 4.0 or higher, or Microsoft Internet Explorer 4.0 or higher.