@Deprecated public class DerbyPersistenceManager extends SimpleDbPersistenceManager
DerbyPersistenceManager
is a JDBC-based
PersistenceManager
for Jackrabbit that persists
ItemState
and NodeReferences
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
: if true
(the default) BINARY
values (BLOBs) are stored in the local file system;
if false
BLOBs are stored in the databaseshutdownOnClose
: if true
(the default) the
database is shutdown when the last connection is closed;
set this to false
when using a standalone databaseSimpleDbPersistenceManager
.
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>
Modifier and Type | Field and Description |
---|---|
protected boolean |
shutdownOnClose
Deprecated.
Flag indicating whether this derby database should be shutdown on close.
|
driver, password, url, user
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 and Description |
---|
DerbyPersistenceManager()
Deprecated.
Creates a new
SimpleDbPersistenceManager instance. |
Modifier and Type | Method and Description |
---|---|
protected void |
closeConnection(Connection connection)
Deprecated.
Closes the given connection and shuts down the embedded Derby
database if
shutdownOnClose is set to true. |
boolean |
getShutdownOnClose()
Deprecated.
|
void |
setShutdownOnClose(boolean shutdownOnClose)
Deprecated.
|
getConnection, getDriver, getPassword, getUrl, getUser, setConnectionFactory, setDriver, setPassword, setUrl, setUser
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
checkConsistency, createNew, createNew
protected boolean shutdownOnClose
public DerbyPersistenceManager()
SimpleDbPersistenceManager
instance.public boolean getShutdownOnClose()
public void setShutdownOnClose(boolean shutdownOnClose)
protected void closeConnection(Connection connection) throws SQLException
shutdownOnClose
is set to true.closeConnection
in class DatabasePersistenceManager
connection
- database connectionSQLException
- if an error occursDatabasePersistenceManager.closeConnection(Connection)
Copyright © 2004–2021 The Apache Software Foundation. All rights reserved.