Generated by
JDiff

org.springframework.jdbc.support.lob Documentation Differences

This file contains all the changes in documentation in the package org.springframework.jdbc.support.lob as colored differences. Deletions are shown like this, and additions are shown like this.
If no deletions or additions are shown in an entry, the HTML tags will be what has changed. The new HTML tags are shown in the differences. If no documentation existed, and then some was added in a later version, this change is noted in the appropriate class pages of differences, but the change is not shown on this page. Only changes in existing text are shown here. Similarly, documentation which was inherited from another class or interface is not shown here.
Note that an HTML error in the new documentation may cause the display of other documentation changes to be presented incorrectly. For instance, failure to close a <code> tag will cause all subsequent paragraphs to be displayed differently.

Class OracleLobHandler

LobHandler implementation for Oracle databases. Uses proprietary API to create oracle.sql.BLOB and oracle.sql.CLOB instances, as necessary when working with Oracle's JDBC driver. Note that this LobHandler requires Oracle JDBC driver 9i or higher!

While most databases are able to work with DefaultLobHandler, Oracle just accepts Blob/Clob instances created via its own proprietary BLOB/CLOB API, and additionally doesn't accept large streams for PreparedStatement's corresponding setter methods. Therefore, you need to use a strategy like this LobHandler implementation.

Needs to work on a native JDBC Connection, to be able to cast it to oracle.jdbc.OracleConnection. If you pass in Connections from a connection pool (the usual case in a J2EE environment), you need to set an appropriate org.springframework.jdbc.support.nativejdbc.NativeJdbcExtractor to allow for automaticalautomatic retrieval of the underlying native JDBC Connection. LobHandler and NativeJdbcExtractor are separate concerns, therefore they are represented by separate strategy interfaces.

Coded via reflection to avoid dependencies on Oracle classes. Even reads in Oracle constants via reflection because of different Oracle drivers (classes12, ojdbc14, ojdbc5, ojdbc6) having different constant values! As this LobHandler initializes Oracle classes on instantiation, do not define this as eager-initializing singleton if you do not want to depend on the Oracle JAR being in the class path: use "lazy-init=true" to avoid this issue. @author Juergen Hoeller @author Thomas Risberg @since 04.12.2003 @see #setNativeJdbcExtractor @see oracle.sql.BLOB @see oracle.sql.CLOBsetNativeJdbcExtractor

Class OracleLobHandler, void initOracleDriverClasses(Connection)

Retrieve the oracle.sql.BLOB and oracle.sql.CLOB classes via reflection, and initialize the values for the DURATION_SESSION, MODE_READWRITE and MODE_READONLY constants defined there. @param con the Oracle Connection, for using the exact same class loader that the Oracle driver was loaded with

See Also: @see

@param con the Oracle Connection, for using the exact same class loader that the Oracle driver was loaded with
Class OracleLobHandler, void setCache(boolean)

Set whether to cache the temporary LOB in the buffer cache. This value will be passed into BLOB/CLOB.createTemporary.

Default is true. @see

See Also:

Class OracleLobHandler, void setNativeJdbcExtractor(NativeJdbcExtractor)

Set an appropriate NativeJdbcExtractor to be able to retrieve the underlying native oracle.jdbc.OracleConnection. This is necessary for DataSource-based connection pools, as those need to return wrapped JDBC Connection handles that cannot be cast to a native Connection implementation.

Effectively, this LobHandler just invokes a single NativeJdbcExtractor method, namely getNativeConnectionFromStatement with a PreparedStatement argument (falling back to a PreparedStatement.getConnection() call if no extractor is set).

A common choice is {@code SimpleNativeJdbcExtractor}, whose Connection unwrapping (which is what OracleLobHandler needs) will work with many connection pools. See {@code SimpleNativeJdbcExtractor's} and oracle.jdbc.OracleConnection javadoc for details. @see org.springframework.jdbc.support.nativejdbc.NativeJdbcExtractor#getNativeConnectionFromStatement @see org.springframework.jdbc.support.nativejdbc.SimpleNativeJdbcExtractor @see org.springframework.jdbc.support.nativejdbc.OracleJdbc4NativeJdbcExtractor @see oracle.jdbc.OracleConnectionOracleJdbc4NativeJdbcExtractor

Class OracleLobHandler, void setReleaseResourcesAfterRead(boolean)

Set whether to agressively release any resources used by the LOB. If set to true then you can only read the LOB values once. Any subsequent reads will fail since the resources have been closed.

Setting this property to true can be useful when your queries generates large temporary LOBs that occupy space in the TEMPORARY tablespace or when you want to free up any memory allocated by the driver for the LOB reading.

Default is false. @see

See Also: