![]() |
![]() |
BEA WebLogic Enterprise 4.2 Developer Center |
![]() HOME | SITE MAP | SEARCH | CONTACT | GLOSSARY | PDF FILES | WHAT'S NEW |
||
![]() DEVELOPING APPLICATIONS | TABLE OF CONTENTS | PREVIOUS TOPIC | INDEX |
This chapter describes the following jdbcKona extensions to the JDBC API:
Class weblogic.jdbc.oci.CallableStatement
For complete details on the JDBC API, refer to the following Web site:
Class The http://www.weblogic.com/docs/classdocs/packages.html#jdbc
Class CallableStatement
weblogic.jdbc.oci.CallableStatement
contains jdbcKona extensions to JDBC to support the use of cursors as parameters in CallableStatement
objects.
CallableStatement
class:
PreparedStatement
class
CallableStatement
interface
java.lang.Object
|
+----weblogic.jdbc.oci.Statement
|
+----weblogic.jdbc.oci.PreparedStatement
|
+----weblogic.jdbc.oci.CallableStatementgetResultSet
method
weblogic.jdbc.oci.CallableStatement.getResultSet
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 theregisterOutputParameter
method, usingjava.sql.Types.OTHER
as the data type.Java Mapping
public ResultSet getResultSet(int parameterIndex) throws SQLExceptionParameters
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 classjava.sql.Connection
. AConnection
object is usually constructed as ajava.sql.Connection
class. To use this extension to JDBC, you must explicitly cast yourConnection
object as aweblogic.jdbc.oci.Connection
class.The public Connection class:
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
valThis parameter is set to true if the connection should wait on resources. Class weblogic.jdbc.oci.Statement
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.jdbc.oci.Statement
class:
- Extends the Object base class
- Has the following inheritance hierarchy:
java.lang.Object
|
+----weblogic.jdbc.oci.Statement- Has the following methods:
fetchsize
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.
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 SQLExceptionParameters
sql
- This parameter is the SQL statement to be verified.
Throws
- SQLException
- This exception is thrown if the operation cannot be completed.