Skip to main content Skip to complementary content

Configuring the Apache Jackrabbit storage to use Oracle

This section explains how to configure the Apache Jackrabbit storage to use Oracle.

Make sure your Oracle database driver has been deployed to the Talend Runtime Container before starting the configuration as shown in the previous section.

The following procedure shows how to change the configuration file for the Service Registry. For the XACML, the Auxiliary Storage, and the Provisioning Service, change the value of the schemaObjectPrefix. For example, for the XACML, in the FileSystem configuration for the repository, set the schemaObjectPrefix to "AX_FS_REPO".

Procedure

  1. Substitute the FileSystem and Datastore for the repository as shown in the example configurations below.
    Replace the default LocalFileSystem and FileDataStore by OracleFileSystem and DbDataStore respectively:
    <Repository>
        <!-- virtual file system where the repository stores global state
                (e.g. registered namespaces, custom node types, etc.) -->
        <FileSystem class="org.apache.jackrabbit.core.fs.db.OracleFileSystem">
            <param name="url" value="jdbc:oracle:thin:@HOST:1521:xe" />
            <param name="user" value="USER" />
            <param name="password" value="secret" />
            <param name="schema" value="oracle" />
            <param name="schemaObjectPrefix" value="SR_FS_REPO_" />
        </FileSystem>
        <!-- data store configuration -->
        <DataStore class="org.apache.jackrabbit.core.data.db.DbDataStore">
            <param name="url" value="jdbc:oracle:thin:@HOST:1521:xe" />
            <param name="driver" value="oracle.jdbc.OracleDriver" />
            <param name="user" value="USER" />
            <param name="password" value="="secret" />
            <param name="databaseType" value="oracle" />
            <param name="minRecordLength" value="1024" />
            <param name="maxConnections" value="3" />
            <param name="copyWhenReading" value="true" />
            <param name="tablePrefix" value="" />
            <param name="schemaObjectPrefix" value="SR_DS_REPO_" />
            </DataStore>
  2. Substitute the FileSystem and PersistenceManager for the workspace as shown in the example configurations below.
    Replace the default LocalFileSystem and DerbyPersistenceManager by OracleFileSystem and OraclePersistenceManager respectively:
    <Workspace name="$ {wsp.name}">
        <!-- virtual file system of the workspace:
                class: FQN of class implementing the FileSystem interface -->
        <FileSystem class="org.apache.jackrabbit.core.fs.db.OracleFileSystem"> 
            <param name="url" value="jdbc:oracle:thin:@HOST:1521:xe" /> 
            <param name="user" value="USER" /> 
            <param name="password" value="secret" /> 
            <param name="schema" value="oracle" /> 
            <param name="schemaObjectPrefix" value="SR_FS_WS_"/>
        </FileSystem>
        <!-- persistence manager of the workspace:
                class: FQN of class implementing the PersistenceManager interface -->
        <PersistenceManager class="org.apache.jackrabbit.core.persistence.pool.OraclePersistenceManager"> 
            <param name="driver" value="oracle.jdbc.OracleDriver" /> 
            <param name="url" value="jdbc:oracle:thin:@HOST:1521:xe" /> 
            <param name="user" value="USER" /> 
            <param name="password" value="secret" /> 
            <param name="databaseType" value="oracle" /> 
            <param name="schemaObjectPrefix" value="SR_${wsp.name}_" /> 
            <param name="externalBLOBs" value="false" />
            </PersistenceManager>
  3. Substitute the FileSystem and PersistenceManager for the versioning as shown in the example configurations below.
    Replace the default LocalFileSystem and DerbyPersistenceManager by OracleFileSystem and OraclePersistenceManager respectively:
    <Versioning rootPath="$ {rep.home}/version">
        <!-- Configures the filesystem to use for versioning for the respective
                persistence manager -->
        <FileSystem class="org.apache.jackrabbit.core.fs.db.OracleFileSystem"> 
            <param name="url" value="jdbc:oracle:thin:@HOST:1521:xe" /> 
            <param name="user" value="USER" /> 
            <param name="password" value="secret" /> 
            <param name="schema" value="oracle" /> 
            <param name="schemaObjectPrefix" value="SR_FS_VERSION_" />
        </FileSystem>
        <!-- 
        Configures the persistence manager to be used for persisting version state.
        Please note that the current versioning implementation is based on
        a 'normal' persistence manager, but this could change in future
        implementations.
         -->
        <PersistenceManager class="org.apache.jackrabbit.core.persistence.pool.OraclePersistenceManager"> 
            <param name="driver" value="oracle.jdbc.OracleDriver" /> 
            <param name="url" value="jdbc:oracle:thin:@HOST:1521:xe" /> 
            <param name="user" value="USER" /> 
            <param name="password" value="secret" /> 
            <param name="databaseType" value="oracle" /> 
            <param name="schemaObjectPrefix" value="SR_VERSION_" /> 
            <param name="externalBLOBs" value="false" />
            </PersistenceManager>

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!