Class DerbyPersistenceManager
- 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.DerbyPersistenceManager
-
- All Implemented Interfaces:
PersistenceManager
,DatabaseAware
@Deprecated public class DerbyPersistenceManager extends SimpleDbPersistenceManager
Deprecated.Please migrate to a bundle persistence manager (JCR-2802)DerbyPersistenceManager
is a JDBC-basedPersistenceManager
for Jackrabbit that persistsItemState
andNodeReferences
objects in an embedded or standalone Derby 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:
url
: the database url of the form"jdbc:derby:[//host:port/][db];[attributes]"
schemaObjectPrefix
: prefix to be prepended to schema objectsdriver
: the FQN name of the JDBC driver class (default:"org.apache.derby.jdbc.EmbeddedDriver"
); Use"org.apache.derby.jdbc.ClientDriver"
when using a standalone databaseschema
: type of schema to be used (default:"derby"
)user
: the database user (default:null
)password
: the user's password (default:null
)externalBLOBs
: iftrue
(the default) BINARY values (BLOBs) are stored in the local file system; iffalse
BLOBs are stored in the databaseshutdownOnClose
: iftrue
(the default) the database is shutdown when the last connection is closed; set this tofalse
when using a standalone database
SimpleDbPersistenceManager
.The following is a fragment from a sample configuration:
<PersistenceManager class="org.apache.jackrabbit.core.persistence.db.DerbyPersistenceManager"> <param name="url" value="jdbc:derby:${wsp.home}/db;create=true"/> <param name="schemaObjectPrefix" value="${wsp.name}_"/> <param name="externalBLOBs" value="false"/> </PersistenceManager>
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
shutdownOnClose
Deprecated.Flag indicating whether this derby database should be shutdown on close.-
Fields inherited from class org.apache.jackrabbit.core.persistence.db.SimpleDbPersistenceManager
driver, password, url, user
-
Fields inherited from class org.apache.jackrabbit.core.persistence.db.DatabasePersistenceManager
autoReconnect, 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 Summary
Constructors Constructor Description DerbyPersistenceManager()
Deprecated.Creates a newSimpleDbPersistenceManager
instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected void
closeConnection(Connection connection)
Deprecated.Closes the given connection and shuts down the embedded Derby database ifshutdownOnClose
is set to true.boolean
getShutdownOnClose()
Deprecated.void
setShutdownOnClose(boolean shutdownOnClose)
Deprecated.-
Methods inherited from class org.apache.jackrabbit.core.persistence.db.SimpleDbPersistenceManager
getConnection, getDriver, getPassword, getUrl, getUser, setConnectionFactory, setDriver, setPassword, setUrl, setUser
-
Methods inherited from class org.apache.jackrabbit.core.persistence.db.DatabasePersistenceManager
buildSQLStatements, checkSchema, close, closeResultSet, closeStatement, createSchemaSql, destroy, destroy, destroy, executeStmt, exists, exists, existsReferencesTo, getSchema, getSchemaDDL, getSchemaObjectPrefix, init, initConnection, initPreparedStatements, isExternalBLOBs, isSchemaCheckEnabled, load, load, loadReferencesTo, logException, prepareSchemaObjectPrefix, reestablishConnection, resetStatement, setExternalBLOBs, setExternalBLOBs, setSchema, setSchemaCheckEnabled, setSchemaObjectPrefix, store, store, store, store
-
Methods inherited from class org.apache.jackrabbit.core.persistence.AbstractPersistenceManager
checkConsistency, createNew, createNew
-
-
-
-
Method Detail
-
getShutdownOnClose
public boolean getShutdownOnClose()
Deprecated.
-
setShutdownOnClose
public void setShutdownOnClose(boolean shutdownOnClose)
Deprecated.
-
closeConnection
protected void closeConnection(Connection connection) throws SQLException
Deprecated.Closes the given connection and shuts down the embedded Derby database ifshutdownOnClose
is set to true.- Overrides:
closeConnection
in classDatabasePersistenceManager
- Parameters:
connection
- database connection- Throws:
SQLException
- if an error occurs- See Also:
DatabasePersistenceManager.closeConnection(Connection)
-
-