org.apache.jackrabbit.core.persistence.bundle
Class Oracle9PersistenceManager

java.lang.Object
  extended by org.apache.jackrabbit.core.persistence.bundle.AbstractBundlePersistenceManager
      extended by org.apache.jackrabbit.core.persistence.bundle.BundleDbPersistenceManager
          extended by org.apache.jackrabbit.core.persistence.bundle.OraclePersistenceManager
              extended by org.apache.jackrabbit.core.persistence.bundle.Oracle9PersistenceManager
All Implemented Interfaces:
CachingPersistenceManager, IterablePersistenceManager, PersistenceManager

public class Oracle9PersistenceManager
extends OraclePersistenceManager

OracleLegacyPersistenceManager provides support for Oracle jdbc drivers prior to version 10 which require special handling of BLOB data.

Configuration:


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.jackrabbit.core.persistence.bundle.BundleDbPersistenceManager
BundleDbPersistenceManager.CloseableBLOBStore, BundleDbPersistenceManager.DbBlobStore, BundleDbPersistenceManager.FSBlobStore
 
Field Summary
 
Fields inherited from class org.apache.jackrabbit.core.persistence.bundle.OraclePersistenceManager
TABLE_SPACE_VARIABLE, tableSpace
 
Fields inherited from class org.apache.jackrabbit.core.persistence.bundle.BundleDbPersistenceManager
binding, blobStore, blockOnConnectionLoss, bundleDeleteSQL, bundleInsertSQL, bundleSelectAllIdsFromSQL, bundleSelectAllIdsSQL, bundleSelectSQL, bundleUpdateSQL, connectionManager, consistencyCheck, consistencyFix, databaseType, driver, errorHandling, externalBLOBs, INITIAL_BUFFER_SIZE, initialized, nodeReferenceDeleteSQL, nodeReferenceInsertSQL, nodeReferenceSelectSQL, nodeReferenceUpdateSQL, password, SCHEMA_OBJECT_PREFIX_VARIABLE, schemaObjectPrefix, SM_BINARY_KEYS, SM_LONGLONG_KEYS, url, user
 
Fields inherited from class org.apache.jackrabbit.core.persistence.bundle.AbstractBundlePersistenceManager
context, NODEFILENAME, NODEREFSFILENAME, RES_NAME_INDEX, RES_NS_INDEX
 
Constructor Summary
Oracle9PersistenceManager()
           
 
Method Summary
protected  BundleDbPersistenceManager.CloseableBLOBStore createDBBlobStore(PMContext context)
          Creates a blob store that uses the database.
protected  Blob createTemporaryBlob(InputStream in)
          Creates a temporary oracle.sql.BLOB instance via reflection and spools the contents of the specified stream.
protected  void freeTemporaryBlob(Object blob)
          Frees a temporary oracle.sql.BLOB instance via reflection.
 void init(PMContext context)
          Initializes the persistence manager.
 void store(NodeReferences refs)
          Stores a node references to the underlying system.
protected  void storeBundle(NodePropBundle bundle)
          Stores a bundle to the underlying system.
 
Methods inherited from class org.apache.jackrabbit.core.persistence.bundle.OraclePersistenceManager
checkTablesWithUser, createDbNameIndex, createSchemaSQL, getTableSpace, prepareSchemaObjectPrefix, setTableSpace
 
Methods inherited from class org.apache.jackrabbit.core.persistence.bundle.BundleDbPersistenceManager
buildSQLStatements, checkBundleConsistency, checkConsistency, checkSchema, checkTablesExist, close, closeResultSet, closeStatement, createBlobStore, createLocalFSBlobStore, createParams, destroy, destroyBundle, exists, existsBundle, getAllNodeIds, getBinding, getBlockOnConnectionLoss, getConsistencyCheck, getConsistencyFix, getDatabaseType, getDriver, getErrorHandling, getKey, getMinBlobSize, getNameIndex, getPassword, getSchema, getSchemaObjectPrefix, getStorageModel, getUrl, getUser, isExternalBLOBs, isSchemaCheckEnabled, load, loadBundle, loadBundle, logException, resetStatement, setBlockOnConnectionLoss, setConsistencyCheck, setConsistencyFix, setDatabaseType, setDriver, setErrorHandling, setExternalBLOBs, setKey, setMinBlobSize, setPassword, setSchema, setSchemaCheckEnabled, setSchemaObjectPrefix, setUrl, setUser, store, toString, useDbBlobStore, useLocalFsBlobStore
 
Methods inherited from class org.apache.jackrabbit.core.persistence.bundle.AbstractBundlePersistenceManager
buildBlobFilePath, buildNodeFilePath, buildNodeFolderPath, buildNodeReferencesFilePath, buildPropFilePath, createNew, createNew, evictBundle, exists, exists, getBundleCacheSize, getNsIndex, load, load, onExternalUpdate, setBundleCacheSize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Oracle9PersistenceManager

public Oracle9PersistenceManager()
Method Detail

init

public void init(PMContext context)
          throws Exception
Initializes the persistence manager. The persistence manager is permanently bound to the given context, and any required external resources are acquired.

An appropriate exception is thrown if the persistence manager initialization fails for whatever reason. In this case the state of the persistence manager is undefined and the instance should be discarded. Initializes the internal structures of this abstract persistence manager.

Retrieve the oracle.sql.BLOB class via reflection, and initialize the values for the DURATION_SESSION and MODE_READWRITE constants defined there.

Specified by:
init in interface PersistenceManager
Overrides:
init in class OraclePersistenceManager
Parameters:
context - persistence manager context
Throws:
Exception - if the persistence manager initialization failed
See Also:
oracle.sql.BLOB#DURATION_SESSION, oracle.sql.BLOB#MODE_READWRITE

createDBBlobStore

protected BundleDbPersistenceManager.CloseableBLOBStore createDBBlobStore(PMContext context)
                                                                   throws Exception
Description copied from class: BundleDbPersistenceManager
Creates a blob store that uses the database. This is called by init if BundleDbPersistenceManager.useDbBlobStore() returns true.

Overrides:
createDBBlobStore in class BundleDbPersistenceManager
Parameters:
context - the persistence manager context
Returns:
a blob store
Throws:
Exception - if an error occurs.

storeBundle

protected void storeBundle(NodePropBundle bundle)
                    throws ItemStateException
Description copied from class: BundleDbPersistenceManager
Stores a bundle to the underlying system.

Overrides:
storeBundle in class BundleDbPersistenceManager
Parameters:
bundle - the bundle to store
Throws:
ItemStateException - if an error while storing occurs.

store

public void store(NodeReferences refs)
           throws ItemStateException
Description copied from class: BundleDbPersistenceManager
Stores a node references to the underlying system. This method uses shared PreparedStatements, which must be used strictly sequentially. Because this method synchronizes on the persistence manager instance, there is no need to synchronize on the shared statement. If the method would not be synchronized, the shared statement must be synchronized.

Overrides:
store in class BundleDbPersistenceManager
Parameters:
refs - the node references to store.
Throws:
ItemStateException - if an error while storing occurs.

createTemporaryBlob

protected Blob createTemporaryBlob(InputStream in)
                            throws Exception
Creates a temporary oracle.sql.BLOB instance via reflection and spools the contents of the specified stream.

Throws:
Exception

freeTemporaryBlob

protected void freeTemporaryBlob(Object blob)
                          throws Exception
Frees a temporary oracle.sql.BLOB instance via reflection.

Throws:
Exception


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