org.apache.ojb.broker.platforms
Class PlatformWLOracle9iImpl

java.lang.Object
  extended by org.apache.ojb.broker.platforms.PlatformDefaultImpl
      extended by org.apache.ojb.broker.platforms.PlatformOracleImpl
          extended by org.apache.ojb.broker.platforms.PlatformWLOracle9iImpl
All Implemented Interfaces:
JoinSyntaxTypes, Platform

Deprecated. since OJB 1.0.2 the default PlatformOracle9iImpl should be usable in WebLogic

public class PlatformWLOracle9iImpl
extends PlatformOracleImpl

This class is a concrete implementation of Platform. Provides an implementation that works around some issues with Oracle running within WebLogic. As WebLogic wraps the Oracle physical connection with its own logical connection it is necessary to retrieve the underlying physical connection before creating a CLOB or BLOB. NOTE : When you use the physical connection WebLogic by default marks it as "infected" and discards it when the logicical connection is closed. You can change this behavior by setting the RemoveInfectedConnectionsEnabled attribute on a connection pool. see http://e-docs.bea.com/wls/docs81/jdbc/thirdparty.html#1043646 Optimization: Oracle Batching (not standard JDBC batching) see http://technet.oracle.com/products/oracle9i/daily/jun07.html Optimization: Oracle Prefetching see http://otn.oracle.com/sample_code/tech/java/sqlj_jdbc/files/advanced/RowPrefetchSample/Readme.html TODO: Optimization: use ROWNUM to minimize the effects of not having server side cursors see http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:127412348064

Version:
CVS $Id: PlatformWLOracle9iImpl.java,v 1.1 2007-08-24 22:17:35 ewestfal Exp $
Author:
Matthew Baird, Erik Forkalsrud, Martin Kalén, Dougall Squair
See Also:
Platform, PlatformDefaultImpl, PlatformOracleImpl, PlatformOracle9iImpl

Field Summary
protected static JdbcType BASE_BLOB
          Deprecated.  
protected static JdbcType BASE_CLOB
          Deprecated.  
protected static Map m_batchStatementsInProgress
          Deprecated.  
protected static Object[] PARAM_BOOLEAN_TRUE
          Deprecated.  
protected static Object[] PARAM_ROW_PREFETCH_SIZE
          Deprecated.  
protected static Object[] PARAM_STATEMENT_BATCH_SIZE
          Deprecated.  
protected static Class[] PARAM_TYPE_BOOLEAN
          Deprecated.  
protected static Class[] PARAM_TYPE_INTEGER
          Deprecated.  
protected static Class[] PARAM_TYPE_STRING
          Deprecated.  
protected static int ROW_PREFETCH_SIZE
          Deprecated.  
protected static int STATEMENTS_PER_BATCH
          Deprecated.  
 
Fields inherited from class org.apache.ojb.broker.platforms.PlatformOracleImpl
ORACLE_JDBC_TYPE_CURSOR, THIN_BLOB_MAX_SIZE, THIN_CLOB_MAX_SIZE, THIN_URL_PREFIX
 
Fields inherited from class org.apache.ojb.broker.platforms.PlatformDefaultImpl
log, m_batchUpdatesChecked, m_supportsBatchUpdates
 
Fields inherited from interface org.apache.ojb.broker.accesslayer.JoinSyntaxTypes
ORACLE_JOIN_SYNTAX, SQL92_JOIN_SYNTAX, SQL92_NOPAREN_JOIN_SYNTAX, SYBASE_JOIN_SYNTAX
 
Constructor Summary
PlatformWLOracle9iImpl()
          Deprecated.  
 
Method Summary
 void addBatch(PreparedStatement stmt)
          Deprecated. Try Oracle update batching and call executeUpdate or revert to JDBC update batching.
 void afterStatementCreate(Statement stmt)
          Deprecated. Enables Oracle row prefetching if supported.
 void beforeBatch(PreparedStatement stmt)
          Deprecated. Try Oracle update batching and call setExecuteBatch or revert to JDBC update batching.
 int[] executeBatch(PreparedStatement stmt)
          Deprecated. Try Oracle update batching and call sendBatch or revert to JDBC update batching.
 void setObjectForStatement(PreparedStatement ps, int index, Object value, int sqlType)
          Deprecated. For objects beyond 4k, weird things happen in Oracle if you try to use "setBytes", so for all cases it's better to use setBinaryStream.
 
Methods inherited from class org.apache.ojb.broker.platforms.PlatformOracleImpl
changePreparedStatementResultSetType, createSequenceQuery, createSequenceQuery, dropSequenceQuery, getJoinSyntaxType, initOracleReflectedVars, isUsingOracleThinDriver, nextSequenceQuery, prepareNextValProcedureStatement, registerOutResultSet
 
Methods inherited from class org.apache.ojb.broker.platforms.PlatformDefaultImpl
addPagingSql, afterStatementClose, beforeStatementClose, bindPagingParameters, bindPagingParametersFirst, changeAutoCommitState, checkForBatchSupport, concatenate, getConcatenationCharacter, getEscapeClause, getLastInsertIdentityQuery, initializeJdbcConnection, setNullForStatement, supportsBatchOperations, supportsMultiColumnCountDistinct, supportsPaging, useCountForResultsetSize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ROW_PREFETCH_SIZE

protected static final int ROW_PREFETCH_SIZE
Deprecated. 
See Also:
Constant Field Values

STATEMENTS_PER_BATCH

protected static final int STATEMENTS_PER_BATCH
Deprecated. 
See Also:
Constant Field Values

m_batchStatementsInProgress

protected static Map m_batchStatementsInProgress
Deprecated. 

PARAM_TYPE_INTEGER

protected static final Class[] PARAM_TYPE_INTEGER
Deprecated. 

PARAM_TYPE_BOOLEAN

protected static final Class[] PARAM_TYPE_BOOLEAN
Deprecated. 

PARAM_TYPE_STRING

protected static final Class[] PARAM_TYPE_STRING
Deprecated. 

PARAM_ROW_PREFETCH_SIZE

protected static final Object[] PARAM_ROW_PREFETCH_SIZE
Deprecated. 

PARAM_STATEMENT_BATCH_SIZE

protected static final Object[] PARAM_STATEMENT_BATCH_SIZE
Deprecated. 

PARAM_BOOLEAN_TRUE

protected static final Object[] PARAM_BOOLEAN_TRUE
Deprecated. 

BASE_CLOB

protected static final JdbcType BASE_CLOB
Deprecated. 

BASE_BLOB

protected static final JdbcType BASE_BLOB
Deprecated. 
Constructor Detail

PlatformWLOracle9iImpl

public PlatformWLOracle9iImpl()
Deprecated. 
Method Detail

afterStatementCreate

public void afterStatementCreate(Statement stmt)
                          throws PlatformException
Deprecated. 
Enables Oracle row prefetching if supported. See http://otn.oracle.com/sample_code/tech/java/sqlj_jdbc/files/advanced/RowPrefetchSample/Readme.html. This is RDBMS server-to-client prefetching and thus one layer below the OJB-internal prefetching-to-cache introduced in version 1.0rc5.

Specified by:
afterStatementCreate in interface Platform
Overrides:
afterStatementCreate in class PlatformOracleImpl
Parameters:
stmt - the statement just created
Throws:
PlatformException - upon JDBC failure

beforeBatch

public void beforeBatch(PreparedStatement stmt)
                 throws PlatformException
Deprecated. 
Try Oracle update batching and call setExecuteBatch or revert to JDBC update batching. See 12-2 Update Batching in the Oracle9i JDBC Developer's Guide and Reference.

Specified by:
beforeBatch in interface Platform
Overrides:
beforeBatch in class PlatformDefaultImpl
Parameters:
stmt - the prepared statement to be used for batching
Throws:
PlatformException - upon JDBC failure

addBatch

public void addBatch(PreparedStatement stmt)
              throws PlatformException
Deprecated. 
Try Oracle update batching and call executeUpdate or revert to JDBC update batching.

Specified by:
addBatch in interface Platform
Overrides:
addBatch in class PlatformDefaultImpl
Parameters:
stmt - the statement beeing added to the batch
Throws:
PlatformException - upon JDBC failure

executeBatch

public int[] executeBatch(PreparedStatement stmt)
                   throws PlatformException
Deprecated. 
Try Oracle update batching and call sendBatch or revert to JDBC update batching.

Specified by:
executeBatch in interface Platform
Overrides:
executeBatch in class PlatformDefaultImpl
Parameters:
stmt - the batched prepared statement about to be executed
Returns:
always null if Oracle update batching is used, since it is impossible to dissolve total row count into distinct statement counts. If JDBC update batching is used, an int array is returned containing number of updated rows for each batched statement.
Throws:
PlatformException - upon JDBC failure

setObjectForStatement

public void setObjectForStatement(PreparedStatement ps,
                                  int index,
                                  Object value,
                                  int sqlType)
                           throws SQLException
Deprecated. 
Description copied from class: PlatformOracleImpl
For objects beyond 4k, weird things happen in Oracle if you try to use "setBytes", so for all cases it's better to use setBinaryStream. Oracle also requires a change in the resultset type of the prepared statement. MBAIRD NOTE: BLOBS may not work with Oracle database/thin driver versions prior to 8.1.6.

Specified by:
setObjectForStatement in interface Platform
Overrides:
setObjectForStatement in class PlatformOracleImpl
Throws:
SQLException
See Also:
Platform.setObjectForStatement(java.sql.PreparedStatement, int, java.lang.Object, int)


Copyright © 2004-2012 The Kuali Foundation. All Rights Reserved.