Class DerbyFileSystem

  extended by org.apache.jackrabbit.core.fs.db.DatabaseFileSystem
      extended by org.apache.jackrabbit.core.fs.db.DbFileSystem
          extended by org.apache.jackrabbit.core.fs.db.DerbyFileSystem
All Implemented Interfaces:
FileSystem, DatabaseAware

public class DerbyFileSystem
extends DbFileSystem

DerbyFileSystem is a JDBC-based FileSystem implementation for Jackrabbit that persists file system entries in an embedded Derby database.

It is configured through the following properties:

See also DbFileSystem.

The following is a fragment from a sample configuration:

   <FileSystem class="org.apache.jackrabbit.core.fs.db.DerbyFileSystem">
       <param name="url" value="jdbc:derby:${rep.home}/db;create=true"/>
       <param name="schemaObjectPrefix" value="rep_"/>

Field Summary
protected  boolean shutdownOnClose
          Flag indicating whether this derby database should be shutdown on close.
Fields inherited from class org.apache.jackrabbit.core.fs.db.DbFileSystem
dataSourceName, driver, password, url, user
Fields inherited from class org.apache.jackrabbit.core.fs.db.DatabaseFileSystem
conHelper, copyFileSQL, copyFilesSQL, deleteFileSQL, deleteFolderSQL, INITIAL_BUFFER_SIZE, initialized, insertFileSQL, insertFolderSQL, schema, schemaObjectPrefix, selectChildCountSQL, selectDataSQL, selectExistSQL, selectFileAndFolderNamesSQL, selectFileExistSQL, selectFileNamesSQL, selectFolderExistSQL, selectFolderNamesSQL, selectLastModifiedSQL, selectLengthSQL, updateDataSQL, updateLastModifiedSQL
Fields inherited from interface org.apache.jackrabbit.core.fs.FileSystem
Constructor Summary
          Creates a new DerbyFileSystem instance.
Method Summary
 void close()
          Close the file system.
protected  ConnectionHelper createConnectionHelper(DataSource dataSrc)
          This method is called from the #init(PMContext) method of this class and returns a ConnectionHelper instance which is assigned to the conHelper field.
 boolean getShutdownOnClose()
 void setShutdownOnClose(boolean shutdownOnClose)
Methods inherited from class org.apache.jackrabbit.core.fs.db.DbFileSystem
equals, getDataSource, getDataSourceName, getDriver, getPassword, getUrl, getUser, hashCode, setConnectionFactory, setDataSourceName, setDriver, setPassword, setUrl, setUser
Methods inherited from class org.apache.jackrabbit.core.fs.db.DatabaseFileSystem
buildSQLStatements, createCheckSchemaOperation, createDeepFolder, createFolder, deleteFile, deleteFolder, exists, getInputStream, getOutputStream, getSchema, getSchemaObjectPrefix, hasChildren, init, isFile, isFolder, isSchemaCheckEnabled, lastModified, length, list, listFiles, listFolders, setSchema, setSchemaCheckEnabled, setSchemaObjectPrefix, verifyRootExists
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait

Field Detail


protected boolean shutdownOnClose
Flag indicating whether this derby database should be shutdown on close.

Constructor Detail


public DerbyFileSystem()
Creates a new DerbyFileSystem instance.

Method Detail


public boolean getShutdownOnClose()


public void setShutdownOnClose(boolean shutdownOnClose)


protected ConnectionHelper createConnectionHelper(DataSource dataSrc)
                                           throws Exception
This method is called from the #init(PMContext) method of this class and returns a ConnectionHelper instance which is assigned to the conHelper field. Subclasses may override it to return a specialized connection helper.

createConnectionHelper in class DatabaseFileSystem
dataSrc - the DataSource of this persistence manager
a ConnectionHelper
Exception - on error


public void close()
           throws FileSystemException
Close the file system. After calling this method, the file system is no longer accessible.

Specified by:
close in interface FileSystem
close in class DatabaseFileSystem

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