org.apache.jackrabbit.core.util.db
Class Oracle10R1ConnectionHelper

java.lang.Object
  extended by org.apache.jackrabbit.core.util.db.ConnectionHelper
      extended by org.apache.jackrabbit.core.util.db.OracleConnectionHelper
          extended by org.apache.jackrabbit.core.util.db.Oracle10R1ConnectionHelper

public final class Oracle10R1ConnectionHelper
extends OracleConnectionHelper

The connection helper for Oracle databases of version up to 10.1. It has special blob handling.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.jackrabbit.core.util.db.ConnectionHelper
ConnectionHelper.RetryManager<T>
 
Field Summary
 
Fields inherited from class org.apache.jackrabbit.core.util.db.ConnectionHelper
dataSource
 
Constructor Summary
Oracle10R1ConnectionHelper(DataSource dataSrc, boolean block)
           
 
Method Summary
protected  PreparedStatement execute(PreparedStatement stmt, Object[] params)
          Wraps any input-stream parameters in temporary blobs and frees these again after the statement has been executed.
 void init()
          Retrieve the oracle.sql.BLOB class via reflection, and initialize the values for the DURATION_SESSION and MODE_READWRITE constants defined there.
 
Methods inherited from class org.apache.jackrabbit.core.util.db.OracleConnectionHelper
replaceCharacter
 
Methods inherited from class org.apache.jackrabbit.core.util.db.ConnectionHelper
closeResources, endBatch, exec, exec, getConnection, inBatchMode, prepareDbIdentifier, startBatch, tableExists, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Oracle10R1ConnectionHelper

public Oracle10R1ConnectionHelper(DataSource dataSrc,
                                  boolean block)
Parameters:
dataSrc - the DataSource on which this helper acts
block - whether to block on connection loss until the db is up again
Method Detail

init

public void init()
          throws Exception
Retrieve the oracle.sql.BLOB class via reflection, and initialize the values for the DURATION_SESSION and MODE_READWRITE constants defined there.

Overrides:
init in class OracleConnectionHelper
Throws:
Exception - on error
See Also:
oracle.sql.BLOB#DURATION_SESSION, oracle.sql.BLOB#MODE_READWRITE

execute

protected PreparedStatement execute(PreparedStatement stmt,
                                    Object[] params)
                             throws SQLException
Wraps any input-stream parameters in temporary blobs and frees these again after the statement has been executed. This method is used by all methods of this class that execute SQL statements. This default implementation sets all parameters and unwraps StreamWrapper instances. Subclasses may override this method to do something special with the parameters. E.g., the Oracle10R1ConnectionHelper overrides it in order to add special blob handling.

Overrides:
execute in class ConnectionHelper
Parameters:
stmt - the PreparedStatement to execute
params - the parameters
Returns:
the executed statement
Throws:
SQLException - on error


Copyright © 2004-2010 The Apache Software Foundation. All Rights Reserved.