|
|
jdbcKona Extensions to the JDBC 1.22 API
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, 805, or 815). The samples in this chapter show oci734. For example:
Class weblogic.jdbc20.oci734.CallableStatement
However, you would use oci805 or oci815, if you are using Oracle 8.0.5 or Oracle 8.1.5, respectively.
For complete details on this JDBC API, refer to the following Web site:
http://www.weblogic.com/docs51/classdocs/jdbcdrivers.html
If this URL changes and you cannot locate this BEA WebLogic JDBC API, please go to http://www.oracle.com/technology/documentation/index.html. On that page, click the link for the BEA WebLogic ServerTM (WLS) documentation. On the WLS page, click the JDBC link in the Quick Links box.
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 oci805 or oci815, if you are using Oracle 8.0.5 or Oracle 8.1.5, respectively.
The CallableStatement class:
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 oci805 or oci815, if you are using Oracle 8.0.5 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
Throws
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 oci805 or oci815, if you are using Oracle 8.0.5 or Oracle 8.1.5, respectively.
The public Connection class:
java.lang.Object
|
+----weblogic.jdbc20.oci734.Connection
weblogic.jdbc20.oci734.Connection.waitOnResources
Note: In the class paths, this section shows oci734. However, you would use oci805 or oci815, if you are using Oracle 8.0.5 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
Class weblogic.jdbc20.oci734.Statement
Note: In the class paths, this section shows oci734. However, you would use oci805 or oci815, if you are using Oracle 8.0.5 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:
java.lang.Object
|
+----weblogic.jdbc20.oci734.Statement
weblogic.jdbc20.oci734.Statement.fetchsize
Note: In the class paths, this section shows oci734. However, you would use oci805 or oci815, if you are using Oracle 8.0.5 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
weblogic.jdbc20.oci734.Statement.parse
Note: In the class paths, this section shows oci734. However, you would use oci805 or oci815, if you are using Oracle 8.0.5 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
Throws
|
Copyright © 2000 BEA Systems, Inc. All rights reserved.
|