org.apache.jackrabbit.core.state.db
Class DerbyPersistenceManager

java.lang.Object
  extended byorg.apache.jackrabbit.core.state.AbstractPersistenceManager
      extended byorg.apache.jackrabbit.core.state.db.SimpleDbPersistenceManager
          extended byorg.apache.jackrabbit.core.state.db.DerbyPersistenceManager
All Implemented Interfaces:
PersistenceManager

public class DerbyPersistenceManager
extends SimpleDbPersistenceManager

DerbyPersistenceManager is a JDBC-based PersistenceManager for Jackrabbit that persists ItemState and NodeReferences objects in an embedded 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:

See also SimpleDbPersistenceManager.

The following is a fragment from a sample configuration:

   <PersistenceManager class="org.apache.jackrabbit.core.state.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 inherited from class org.apache.jackrabbit.core.state.db.SimpleDbPersistenceManager
blobDelete, blobFS, blobInsert, blobSelect, blobSelectExist, blobStore, blobUpdate, con, driver, externalBLOBs, INITIAL_BUFFER_SIZE, initialized, nodeReferenceDelete, nodeReferenceInsert, nodeReferenceSelect, nodeReferenceSelectExist, nodeReferenceUpdate, nodeStateDelete, nodeStateInsert, nodeStateSelect, nodeStateSelectExist, nodeStateUpdate, password, propertyStateDelete, propertyStateInsert, propertyStateSelect, propertyStateSelectExist, propertyStateUpdate, schema, SCHEMA_OBJECT_PREFIX_VARIABLE, schemaObjectPrefix, url, user
 
Constructor Summary
DerbyPersistenceManager()
          Creates a new SimpleDbPersistenceManager instance.
 
Method Summary
 void close()
          Closes the persistence manager. The consistency of the persistent storage is guaranteed and all acquired resources are released. It is an error to invoke any methods on a closed persistence manager, and implementations are free to enforce this constraint by throwing IllegalStateExceptions in such cases.

An appropriate exception is thrown if the persistence manager could not be closed properly. In this case the state of the persistence manager is undefined and the instance should be discarded.

Overridden in order to properly shutdown the embedded Derby database.

 
Methods inherited from class org.apache.jackrabbit.core.state.db.SimpleDbPersistenceManager
checkSchema, closeResultSet, closeStatement, closeStream, destroy, destroy, destroy, exists, exists, exists, getDriver, getPassword, getSchema, getSchemaObjectPrefix, getUrl, getUser, init, isExternalBLOBs, load, load, load, logException, prepareSchemaObjectPrefix, resetStatement, setDriver, setExternalBLOBs, setExternalBLOBs, setPassword, setSchema, setSchemaObjectPrefix, setUrl, setUser, store, store, store, store
 
Methods inherited from class org.apache.jackrabbit.core.state.AbstractPersistenceManager
createNew, createNew
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DerbyPersistenceManager

public DerbyPersistenceManager()
Creates a new SimpleDbPersistenceManager instance.

Method Detail

close

public void close()
           throws Exception
Closes the persistence manager. The consistency of the persistent storage is guaranteed and all acquired resources are released. It is an error to invoke any methods on a closed persistence manager, and implementations are free to enforce this constraint by throwing IllegalStateExceptions in such cases.

An appropriate exception is thrown if the persistence manager could not be closed properly. In this case the state of the persistence manager is undefined and the instance should be discarded.

Overridden in order to properly shutdown the embedded Derby database.

Specified by:
close in interface PersistenceManager
Overrides:
close in class SimpleDbPersistenceManager
Throws:
Exception


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