org.apache.jackrabbit.core.persistence.db
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. Please migrate to a bundle persistence manager
(JCR-2802)
@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 objects
driver
: the FQN name of the JDBC driver class
(default: "org.apache.derby.jdbc.EmbeddedDriver"
); Use
"org.apache.derby.jdbc.ClientDriver"
when using a standalone database
schema
: 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 database
shutdownOnClose
: if true
(the default) the
database is shutdown when the last connection is closed;
set this to false
when using a standalone database
See also 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 |
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.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 |
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
shutdownOnClose
protected boolean shutdownOnClose
- Deprecated.
- Flag indicating whether this derby database should be shutdown on close.
DerbyPersistenceManager
public DerbyPersistenceManager()
- Deprecated.
- Creates a new
SimpleDbPersistenceManager
instance.
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 if
shutdownOnClose
is set to true.
- Overrides:
closeConnection
in class DatabasePersistenceManager
- Parameters:
connection
- database connection
- Throws:
SQLException
- if an error occurs- See Also:
DatabasePersistenceManager.closeConnection(Connection)
Copyright © 2004-2010 The Apache Software Foundation. All Rights Reserved.