Class OraclePersistenceManager
- java.lang.Object
- 
- org.apache.jackrabbit.core.persistence.AbstractPersistenceManager
- 
- org.apache.jackrabbit.core.persistence.db.DatabasePersistenceManager
- 
- org.apache.jackrabbit.core.persistence.db.SimpleDbPersistenceManager
- 
- org.apache.jackrabbit.core.persistence.db.OraclePersistenceManager
 
 
 
 
- 
- All Implemented Interfaces:
- PersistenceManager,- DatabaseAware
 
 @Deprecated public class OraclePersistenceManager extends SimpleDbPersistenceManager Deprecated.Please migrate to a bundle persistence manager (JCR-2802)OraclePersistenceManageris a JDBC-basedPersistenceManagerfor Jackrabbit that persistsItemStateandNodeReferencesobjects in Oracle database using a simple custom serialization format and a very basic non-normalized database schema (in essence tables with one 'key' and one 'data' column).It is configured through the following properties: - driver: the FQN name of the JDBC driver class (default:- "oracle.jdbc.OracleDriver")
- schema: type of schema to be used (default:- "oracle")
- url: the database url (e.g.- "jdbc:oracle:thin:@[host]:[port]:[sid]")
- user: the database user
- password: the user's password
- schemaObjectPrefix: prefix to be prepended to schema objects
- tableSpace: the tablespace to use
- externalBLOBs: if- true(the default) BINARY values (BLOBs) are stored in the local file system; if- falseBLOBs are stored in the database
 SimpleDbPersistenceManager.The following is a fragment from a sample configuration: <PersistenceManager class="org.apache.jackrabbit.core.persistence.db.OraclePersistenceManager"> <param name="url" value="jdbc:oracle:thin:@127.0.0.1:1521:orcl"/> <param name="user" value="scott"/> <param name="password" value="tiger"/> <param name="schemaObjectPrefix" value="${wsp.name}_"/> <param name="tableSpace" value=""/> <param name="externalBLOBs" value="false"/> </PersistenceManager>
- 
- 
Field SummaryFields Modifier and Type Field Description static StringTABLE_SPACE_VARIABLEDeprecated.the variable for the Oracle table spaceprotected StringtableSpaceDeprecated.the Oracle table space to use- 
Fields inherited from class org.apache.jackrabbit.core.persistence.db.SimpleDbPersistenceManagerdriver, password, url, user
 - 
Fields inherited from class org.apache.jackrabbit.core.persistence.db.DatabasePersistenceManagerautoReconnect, blobDeleteSQL, blobFS, blobInsertSQL, blobSelectExistSQL, blobSelectSQL, blobStore, blobUpdateSQL, con, externalBLOBs, INITIAL_BUFFER_SIZE, initialized, nodeReferenceDeleteSQL, nodeReferenceInsertSQL, nodeReferenceSelectExistSQL, nodeReferenceSelectSQL, nodeReferenceUpdateSQL, nodeStateDeleteSQL, nodeStateInsertSQL, nodeStateSelectExistSQL, nodeStateSelectSQL, nodeStateUpdateSQL, propertyStateDeleteSQL, propertyStateInsertSQL, propertyStateSelectExistSQL, propertyStateSelectSQL, propertyStateUpdateSQL, schema, SCHEMA_OBJECT_PREFIX_VARIABLE, schemaObjectPrefix, SLEEP_BEFORE_RECONNECT
 
- 
 - 
Constructor SummaryConstructors Constructor Description OraclePersistenceManager()Deprecated.Creates a newOraclePersistenceManagerinstance.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected voidcheckSchema()Deprecated.Checks if the required schema objects exist and creates them if they don't exist yet.protected BlobcreateTemporaryBlob(InputStream in)Deprecated.Creates a temporary oracle.sql.BLOB instance via reflection and spools the contents of the specified stream.protected voidfreeTemporaryBlob(Object blob)Deprecated.Frees a temporary oracle.sql.BLOB instance via reflection.StringgetTableSpace()Deprecated.Returns the configured Oracle table space.voidinit(PMContext context)Deprecated.Initializes the persistence manager.voidsetTableSpace(String tableSpace)Deprecated.Sets the Oracle table space.voidstore(NodeReferences refs)Deprecated.Store a references object.voidstore(NodeState state)Deprecated.Store a node state.voidstore(PropertyState state)Deprecated.Store a property state.- 
Methods inherited from class org.apache.jackrabbit.core.persistence.db.SimpleDbPersistenceManagergetConnection, getDriver, getPassword, getUrl, getUser, setConnectionFactory, setDriver, setPassword, setUrl, setUser
 - 
Methods inherited from class org.apache.jackrabbit.core.persistence.db.DatabasePersistenceManagerbuildSQLStatements, close, closeConnection, closeResultSet, closeStatement, createSchemaSql, destroy, destroy, destroy, executeStmt, exists, exists, existsReferencesTo, getSchema, getSchemaDDL, getSchemaObjectPrefix, initConnection, initPreparedStatements, isExternalBLOBs, isSchemaCheckEnabled, load, load, loadReferencesTo, logException, prepareSchemaObjectPrefix, reestablishConnection, resetStatement, setExternalBLOBs, setExternalBLOBs, setSchema, setSchemaCheckEnabled, setSchemaObjectPrefix, store
 - 
Methods inherited from class org.apache.jackrabbit.core.persistence.AbstractPersistenceManagercheckConsistency, createNew, createNew
 
- 
 
- 
- 
- 
Field Detail- 
TABLE_SPACE_VARIABLEpublic static final String TABLE_SPACE_VARIABLE Deprecated.the variable for the Oracle table space- See Also:
- Constant Field Values
 
 - 
tableSpaceprotected String tableSpace Deprecated.the Oracle table space to use
 
- 
 - 
Method Detail- 
getTableSpacepublic String getTableSpace() Deprecated.Returns the configured Oracle table space.- Returns:
- the configured Oracle table space.
 
 - 
setTableSpacepublic void setTableSpace(String tableSpace) Deprecated.Sets the Oracle table space.- Parameters:
- tableSpace- the Oracle table space.
 
 - 
initpublic void init(PMContext context) throws Exception Deprecated.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. Retrieve the oracle.sql.BLOBclass via reflection, and initialize the values for theDURATION_SESSIONandMODE_READWRITEconstants defined there.- Specified by:
- initin interface- PersistenceManager
- Overrides:
- initin class- DatabasePersistenceManager
- Parameters:
- context- persistence manager context
- Throws:
- Exception- if the persistence manager initialization failed
 
 - 
storepublic void store(NodeState state) throws ItemStateException Deprecated.Store a node state. Subclass responsibility.This method uses shared PreparedStatements which must be executed 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 statements would have to be synchronized.- Overrides:
- storein class- DatabasePersistenceManager
- Parameters:
- state- node state to store
- Throws:
- ItemStateException- if an error occurs
 
 - 
storepublic void store(PropertyState state) throws ItemStateException Deprecated.Store a property state. Subclass responsibility.This method uses shared PreparedStatements which must be executed 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 statements would have to be synchronized.- Overrides:
- storein class- DatabasePersistenceManager
- Parameters:
- state- property state to store
- Throws:
- ItemStateException- if an error occurs
 
 - 
storepublic void store(NodeReferences refs) throws ItemStateException Deprecated.Store a references object. Subclass responsibility.This method uses shared PreparedStatements which must be executed 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 statements would have to be synchronized.- Overrides:
- storein class- DatabasePersistenceManager
- Parameters:
- refs- references object to store
- Throws:
- ItemStateException- if an error occurs
 
 - 
checkSchemaprotected void checkSchema() throws ExceptionDeprecated.Checks if the required schema objects exist and creates them if they don't exist yet.Overridden in order to support multiple oracle schemas. Note that schema names in Oracle correspond to the username of the connection. See http://issues.apache.org/jira/browse/JCR-582 - Overrides:
- checkSchemain class- DatabasePersistenceManager
- Throws:
- Exception- if an error occurs
 
 - 
createTemporaryBlobprotected Blob createTemporaryBlob(InputStream in) throws Exception Deprecated.Creates a temporary oracle.sql.BLOB instance via reflection and spools the contents of the specified stream.- Throws:
- Exception
 
 
- 
 
-