jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r1179984 - in /jackrabbit/trunk/jackrabbit-core/src: main/java/org/apache/jackrabbit/core/fs/db/ main/java/org/apache/jackrabbit/core/journal/ main/java/org/apache/jackrabbit/core/persistence/pool/ main/resources/org/apache/jackrabbit/core/...
Date Fri, 07 Oct 2011 09:51:40 GMT
Author: jukka
Date: Fri Oct  7 09:51:40 2011
New Revision: 1179984

URL: http://svn.apache.org/viewvc?rev=1179984&view=rev
Log:
JCR-3030: Permit using different tablespaces for tables and indexes with Oracle

Patch by Edouard Hue

Added:
    jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/OracleRepositoryTest.java   (with props)
    jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/OracleRetrocompatibleRepositoryTest.java   (with props)
    jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/fs/db/OracleFileSystemTest.java   (with props)
    jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/fs/db/OracleRetrocompatibleFileSystemTest.java   (with props)
    jackrabbit/trunk/jackrabbit-core/src/test/resources/org/apache/jackrabbit/core/repository-oracle-compat.xml   (with props)
    jackrabbit/trunk/jackrabbit-core/src/test/resources/org/apache/jackrabbit/core/repository-oracle.xml   (with props)
Modified:
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/fs/db/OracleFileSystem.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/journal/OracleDatabaseJournal.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/pool/OraclePersistenceManager.java
    jackrabbit/trunk/jackrabbit-core/src/main/resources/org/apache/jackrabbit/core/fs/db/oracle.ddl
    jackrabbit/trunk/jackrabbit-core/src/main/resources/org/apache/jackrabbit/core/journal/oracle.ddl
    jackrabbit/trunk/jackrabbit-core/src/main/resources/org/apache/jackrabbit/core/persistence/bundle/oracle.ddl

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/fs/db/OracleFileSystem.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/fs/db/OracleFileSystem.java?rev=1179984&r1=1179983&r2=1179984&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/fs/db/OracleFileSystem.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/fs/db/OracleFileSystem.java Fri Oct  7 09:51:40 2011
@@ -16,12 +16,12 @@
  */
 package org.apache.jackrabbit.core.fs.db;
 
+import javax.sql.DataSource;
+
 import org.apache.jackrabbit.core.util.db.CheckSchemaOperation;
 import org.apache.jackrabbit.core.util.db.ConnectionHelper;
 import org.apache.jackrabbit.core.util.db.OracleConnectionHelper;
 
-import javax.sql.DataSource;
-
 /**
  * <code>OracleFileSystem</code> is a JDBC-based <code>FileSystem</code>
  * implementation for Jackrabbit that persists file system entries in an
@@ -38,7 +38,8 @@ import javax.sql.DataSource;
  * <li><code>user</code>: the database user</li>
  * <li><code>password</code>: the user's password</li>
  * <li><code>schemaObjectPrefix</code>: prefix to be prepended to schema objects</li>
- * <li><code>tableSpace</code>: the tablespace to use</li>
+ * <li><code>tablespace</code>: the tablespace to use for tables (also used for indexes if <code>indexTablespace</code> is omitted)</li>
+ * <li><code>indexTablespace</code>: the tablespace to use for indexes</li>
  * </ul>
  * See also {@link DbFileSystem}.
  * <p/>
@@ -49,15 +50,34 @@ import javax.sql.DataSource;
  *       &lt;param name="user" value="scott"/&gt;
  *       &lt;param name="password" value="tiger"/&gt;
  *       &lt;param name="schemaObjectPrefix" value="rep_"/&gt;
- *       &lt;param name="tableSpace" value="default"/&gt;
+ *       &lt;param name="tablespace" value="user"/&gt;
+ *       &lt;param name="indexTablespace" value="user"/&gt;
  *  &lt;/FileSystem&gt;
  * </pre>
  */
 public class OracleFileSystem extends DbFileSystem {
+    /**
+     * The default tablespace clause used when {@link #tablespace} or {@link #indexTablespace}
+     * are not specified.
+     */
+    protected static final String DEFAULT_TABLESPACE_CLAUSE = "";
+    
+    /**
+     * Name of the replacement variable in the DDL for {@link #tablespace}.
+     */
+    protected static final String TABLESPACE_VARIABLE = "${tablespace}";
+    
+    /**
+     * Name of the replacement variable in the DDL for {@link #indexTablespace}.
+     */
+    protected static final String INDEX_TABLESPACE_VARIABLE = "${indexTablespace}";
 
-    /** the Oracle table space to use */
-    protected String tableSpace = "";
+    /** The Oracle tablespace to use for tables */
+    protected String tablespace;
 
+    /** The Oracle tablespace to use for indexes */
+    protected String indexTablespace;
+    
     /**
      * Creates a new <code>OracleFileSystem</code> instance.
      */
@@ -66,26 +86,57 @@ public class OracleFileSystem extends Db
         schema = "oracle";
         driver = "oracle.jdbc.OracleDriver";
         schemaObjectPrefix = "";
+        tablespace = DEFAULT_TABLESPACE_CLAUSE;
+        indexTablespace = DEFAULT_TABLESPACE_CLAUSE;
         initialized = false;
     }
 
     /**
-     * Returns the configured Oracle table space.
-     * @return the configured Oracle table space.
+     * Returns the configured Oracle tablespace for tables.
+     * @return the configured Oracle tablespace for tables.
      */
-    public String getTableSpace() {
-        return tableSpace;
+    public String getTablespace() {
+        return tablespace;
     }
 
     /**
-     * Sets the Oracle table space.
-     * @param tableSpace the Oracle table space.
+     * Sets the Oracle tablespace for tables.
+     * @param tablespaceName the Oracle tablespace for tables.
      */
-    public void setTableSpace(String tableSpace) {
-        if (tableSpace != null && tableSpace.trim().length() > 0) {
-            this.tableSpace = "tablespace " + tableSpace.trim();
+    public void setTablespace(String tablespaceName) {
+        this.tablespace = this.buildTablespaceClause(tablespaceName);
+    }
+    
+    /**
+     * Returns the configured Oracle tablespace for indexes.
+     * @return the configured Oracle tablespace for indexes.
+     */
+    public String getIndexTablespace() {
+        return indexTablespace;
+    }
+    
+    /**
+     * Sets the Oracle tablespace for indexes.
+     * @param tablespace the Oracle tablespace for indexes.
+     */
+    public void setIndexTablespace(String tablespaceName) {
+        this.indexTablespace = this.buildTablespaceClause(tablespaceName);
+    }
+    
+    /**
+     * Constructs the <code>tablespace &lt;tbs name&gt;</code> clause from
+     * the supplied tablespace name. If the name is empty, {@link #DEFAULT_TABLESPACE_CLAUSE}
+     * is returned instead.
+     * 
+     * @param tablespaceName A tablespace name
+     * @return A tablespace clause using the supplied name or
+     * <code>{@value #DEFAULT_TABLESPACE_CLAUSE}</code> if the name is empty
+     */
+    private String buildTablespaceClause(String tablespaceName) {
+        if (tablespaceName == null || tablespaceName.trim().length() == 0) {
+            return DEFAULT_TABLESPACE_CLAUSE;
         } else {
-            this.tableSpace = "";
+            return "tablespace " + tablespaceName.trim();
         }
     }
 
@@ -106,8 +157,13 @@ public class OracleFileSystem extends Db
      */
     @Override
     protected CheckSchemaOperation createCheckSchemaOperation() {
-        return super.createCheckSchemaOperation().addVariableReplacement(
-            CheckSchemaOperation.TABLE_SPACE_VARIABLE, tableSpace);
+        if (DEFAULT_TABLESPACE_CLAUSE.equals(indexTablespace) && !DEFAULT_TABLESPACE_CLAUSE.equals(tablespace)) {
+            // tablespace was set but not indexTablespace : use the same for both
+            indexTablespace = tablespace;
+        }
+        return super.createCheckSchemaOperation()
+            .addVariableReplacement(TABLESPACE_VARIABLE, tablespace)
+            .addVariableReplacement(INDEX_TABLESPACE_VARIABLE, indexTablespace);
     }
 
     //-----------------------------------------< DatabaseFileSystem overrides >

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/journal/OracleDatabaseJournal.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/journal/OracleDatabaseJournal.java?rev=1179984&r1=1179983&r2=1179984&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/journal/OracleDatabaseJournal.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/journal/OracleDatabaseJournal.java Fri Oct  7 09:51:40 2011
@@ -25,22 +25,88 @@ import org.apache.jackrabbit.core.util.d
 /**
  * It has the following property in addition to those of the DatabaseJournal:
  * <ul>
- * <li><code>tableSpace</code>: the Oracle tablespace to use</li>
+ * <li><code>tablespace</code>: the tablespace to use for tables</li>
+ * <li><code>indexTablespace</code>: the tablespace to use for indexes</li>
  * </ul>
  */
 public class OracleDatabaseJournal extends DatabaseJournal {
+    /**
+     * The default tablespace clause used when {@link #tablespace} or {@link #indexTablespace}
+     * are not specified.
+     */
+    protected static final String DEFAULT_TABLESPACE_CLAUSE = "";
 
-    /** the variable for the Oracle table space */
-    public static final String TABLE_SPACE_VARIABLE =
-        "${tableSpace}";
+    /**
+     * Name of the replacement variable in the DDL for {@link #tablespace}.
+     */
+    protected static final String TABLESPACE_VARIABLE = "${tablespace}";
 
-    /** the Oracle table space to use */
-    protected String tableSpace = "";
+    /**
+     * Name of the replacement variable in the DDL for {@link #indexTablespace}.
+     */
+    protected static final String INDEX_TABLESPACE_VARIABLE = "${indexTablespace}";
+
+    /** The Oracle tablespace to use for tables */
+    protected String tablespace;
+
+    /** The Oracle tablespace to use for indexes */
+    protected String indexTablespace;
 
     public OracleDatabaseJournal() {
         setDatabaseType("oracle");
         setDriver("oracle.jdbc.OracleDriver");
         setSchemaObjectPrefix("");
+        tablespace = DEFAULT_TABLESPACE_CLAUSE;
+        indexTablespace = DEFAULT_TABLESPACE_CLAUSE;
+    }
+
+    /**
+     * Returns the configured Oracle tablespace for tables.
+     * @return the configured Oracle tablespace for tables.
+     */
+    public String getTablespace() {
+        return tablespace;
+    }
+
+    /**
+     * Sets the Oracle tablespace for tables.
+     * @param tablespaceName the Oracle tablespace for tables.
+     */
+    public void setTablespace(String tablespaceName) {
+        this.tablespace = this.buildTablespaceClause(tablespaceName);
+    }
+    
+    /**
+     * Returns the configured Oracle tablespace for indexes.
+     * @return the configured Oracle tablespace for indexes.
+     */
+    public String getIndexTablespace() {
+        return indexTablespace;
+    }
+    
+    /**
+     * Sets the Oracle tablespace for indexes.
+     * @param tablespace the Oracle tablespace for indexes.
+     */
+    public void setIndexTablespace(String tablespaceName) {
+        this.indexTablespace = this.buildTablespaceClause(tablespaceName);
+    }
+    
+    /**
+     * Constructs the <code>tablespace &lt;tbs name&gt;</code> clause from
+     * the supplied tablespace name. If the name is empty, {@link #DEFAULT_TABLESPACE_CLAUSE}
+     * is returned instead.
+     * 
+     * @param tablespaceName A tablespace name
+     * @return A tablespace clause using the supplied name or
+     * <code>{@value #DEFAULT_TABLESPACE_CLAUSE}</code> if the name is empty
+     */
+    private String buildTablespaceClause(String tablespaceName) {
+        if (tablespaceName == null || tablespaceName.trim().length() == 0) {
+            return DEFAULT_TABLESPACE_CLAUSE;
+        } else {
+            return "tablespace " + tablespaceName.trim();
+        }
     }
 
     /**
@@ -58,27 +124,12 @@ public class OracleDatabaseJournal exten
      */
     @Override
     protected CheckSchemaOperation createCheckSchemaOperation() {
-        return super.createCheckSchemaOperation().addVariableReplacement(
-            CheckSchemaOperation.TABLE_SPACE_VARIABLE, tableSpace);
-    }
-
-    /**
-     * Returns the configured Oracle table space.
-     * @return the configured Oracle table space.
-     */
-    public String getTableSpace() {
-        return tableSpace;
-    }
-
-    /**
-     * Sets the Oracle table space.
-     * @param tableSpace the Oracle table space.
-     */
-    public void setTableSpace(String tableSpace) {
-        if (tableSpace != null && tableSpace.trim().length() > 0) {
-            this.tableSpace = "tablespace " + tableSpace.trim();
-        } else {
-            this.tableSpace = "";
+        if (DEFAULT_TABLESPACE_CLAUSE.equals(indexTablespace) && !DEFAULT_TABLESPACE_CLAUSE.equals(tablespace)) {
+            // tablespace was set but not indexTablespace : use the same for both
+            indexTablespace = tablespace;
         }
+        return super.createCheckSchemaOperation()
+            .addVariableReplacement(TABLESPACE_VARIABLE, tablespace)
+            .addVariableReplacement(INDEX_TABLESPACE_VARIABLE, indexTablespace);
     }
 }

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/pool/OraclePersistenceManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/pool/OraclePersistenceManager.java?rev=1179984&r1=1179983&r2=1179984&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/pool/OraclePersistenceManager.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/pool/OraclePersistenceManager.java Fri Oct  7 09:51:40 2011
@@ -38,42 +38,90 @@ import org.apache.jackrabbit.core.util.d
  * <li>&lt;param name="{@link #setPassword(String) password}" value=""/>
  * <li>&lt;param name="{@link #setSchema(String) schema}" value="oracle"/>
  * <li>&lt;param name="{@link #setSchemaObjectPrefix(String) schemaObjectPrefix}" value="${wsp.name}_"/>
- * <li>&lt;param name="{@link #setTableSpace(String) tableSpace}" value=""/>
+ * <li>&lt;param name="{@link #setTablespace(String) tableSpace}" value="user"/>
+ * <li>&lt;param name="{@link #setIndexTablespace(String) tableSpace}" value="user"/>
  * <li>&lt;param name="{@link #setErrorHandling(String) errorHandling}" value=""/>
  * </ul>
  */
 public class OraclePersistenceManager extends BundleDbPersistenceManager {
+    /**
+     * The default tablespace clause used when {@link #tablespace} or {@link #indexTablespace}
+     * are not specified.
+     */
+    protected static final String DEFAULT_TABLESPACE_CLAUSE = "";
 
-    /** the Oracle table space to use */
-    protected String tableSpace = "";
+    /**
+     * Name of the replacement variable in the DDL for {@link #tablespace}.
+     */
+    protected static final String TABLESPACE_VARIABLE = "${tablespace}";
+
+    /**
+     * Name of the replacement variable in the DDL for {@link #indexTablespace}.
+     */
+    protected static final String INDEX_TABLESPACE_VARIABLE = "${indexTablespace}";
+
+    /** The Oracle tablespace to use for tables */
+    protected String tablespace;
+
+    /** The Oracle tablespace to use for indexes */
+    protected String indexTablespace;
 
     /**
      * Creates a new oracle persistence manager
      */
     public OraclePersistenceManager() {
+        tablespace = DEFAULT_TABLESPACE_CLAUSE;
+        indexTablespace = DEFAULT_TABLESPACE_CLAUSE;
         // enable db blob support
         setExternalBLOBs(false);
     }
 
     /**
-     * Returns the configured Oracle table space.
-     * 
-     * @return the configured Oracle table space.
+     * Returns the configured Oracle tablespace for tables.
+     * @return the configured Oracle tablespace for tables.
      */
-    public String getTableSpace() {
-        return tableSpace;
+    public String getTablespace() {
+        return tablespace;
     }
 
     /**
-     * Sets the Oracle table space.
-     * 
-     * @param tableSpace the Oracle table space.
+     * Sets the Oracle tablespace for tables.
+     * @param tablespaceName the Oracle tablespace for tables.
      */
-    public void setTableSpace(String tableSpace) {
-        if (tableSpace != null && tableSpace.trim().length() > 0) {
-            this.tableSpace = "tablespace " + tableSpace.trim();
+    public void setTablespace(String tablespaceName) {
+        this.tablespace = this.buildTablespaceClause(tablespaceName);
+    }
+    
+    /**
+     * Returns the configured Oracle tablespace for indexes.
+     * @return the configured Oracle tablespace for indexes.
+     */
+    public String getIndexTablespace() {
+        return indexTablespace;
+    }
+    
+    /**
+     * Sets the Oracle tablespace for indexes.
+     * @param tablespace the Oracle tablespace for indexes.
+     */
+    public void setIndexTablespace(String tablespaceName) {
+        this.indexTablespace = this.buildTablespaceClause(tablespaceName);
+    }
+    
+    /**
+     * Constructs the <code>tablespace &lt;tbs name&gt;</code> clause from
+     * the supplied tablespace name. If the name is empty, {@link #DEFAULT_TABLESPACE_CLAUSE}
+     * is returned instead.
+     * 
+     * @param tablespaceName A tablespace name
+     * @return A tablespace clause using the supplied name or
+     * <code>{@value #DEFAULT_TABLESPACE_CLAUSE}</code> if the name is empty
+     */
+    private String buildTablespaceClause(String tablespaceName) {
+        if (tablespaceName == null || tablespaceName.trim().length() == 0) {
+            return DEFAULT_TABLESPACE_CLAUSE;
         } else {
-            this.tableSpace = "";
+            return "tablespace " + tablespaceName.trim();
         }
     }
 
@@ -119,7 +167,12 @@ public class OraclePersistenceManager ex
      */
     @Override
     protected CheckSchemaOperation createCheckSchemaOperation() {
-        return super.createCheckSchemaOperation().addVariableReplacement(
-            CheckSchemaOperation.TABLE_SPACE_VARIABLE, tableSpace);
+        if (DEFAULT_TABLESPACE_CLAUSE.equals(indexTablespace) && !DEFAULT_TABLESPACE_CLAUSE.equals(tablespace)) {
+            // tablespace was set but not indexTablespace : use the same for both
+            indexTablespace = tablespace;
+        }
+        return super.createCheckSchemaOperation()
+            .addVariableReplacement(TABLESPACE_VARIABLE, tablespace)
+            .addVariableReplacement(INDEX_TABLESPACE_VARIABLE, indexTablespace);
     }
 }

Modified: jackrabbit/trunk/jackrabbit-core/src/main/resources/org/apache/jackrabbit/core/fs/db/oracle.ddl
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/resources/org/apache/jackrabbit/core/fs/db/oracle.ddl?rev=1179984&r1=1179983&r2=1179984&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/resources/org/apache/jackrabbit/core/fs/db/oracle.ddl (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/resources/org/apache/jackrabbit/core/fs/db/oracle.ddl Fri Oct  7 09:51:40 2011
@@ -12,5 +12,5 @@
 #  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 #  See the License for the specific language governing permissions and
 #  limitations under the License.
-create table ${schemaObjectPrefix}FSENTRY (FSENTRY_PATH varchar2(2048) not null, FSENTRY_NAME varchar2(255) not null, FSENTRY_DATA blob null, FSENTRY_LASTMOD number(38,0) not null, FSENTRY_LENGTH number(38,0) null) ${tableSpace}
-create unique index ${schemaObjectPrefix}FSENTRY_IDX on ${schemaObjectPrefix}FSENTRY (FSENTRY_PATH, FSENTRY_NAME) ${tableSpace}
+create table ${schemaObjectPrefix}FSENTRY (FSENTRY_PATH varchar2(2048) not null, FSENTRY_NAME varchar2(255) not null, FSENTRY_DATA blob null, FSENTRY_LASTMOD number(38,0) not null, FSENTRY_LENGTH number(38,0) null) ${tablespace}
+create unique index ${schemaObjectPrefix}FSENTRY_IDX on ${schemaObjectPrefix}FSENTRY (FSENTRY_PATH, FSENTRY_NAME) ${indexTablespace}

Modified: jackrabbit/trunk/jackrabbit-core/src/main/resources/org/apache/jackrabbit/core/journal/oracle.ddl
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/resources/org/apache/jackrabbit/core/journal/oracle.ddl?rev=1179984&r1=1179983&r2=1179984&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/resources/org/apache/jackrabbit/core/journal/oracle.ddl (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/resources/org/apache/jackrabbit/core/journal/oracle.ddl Fri Oct  7 09:51:40 2011
@@ -12,11 +12,13 @@
 #  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 #  See the License for the specific language governing permissions and
 #  limitations under the License.
-create table ${schemaObjectPrefix}JOURNAL (REVISION_ID number(20,0) NOT NULL, JOURNAL_ID varchar(255), PRODUCER_ID varchar(255), REVISION_DATA blob) ${tableSpace}
-create unique index ${schemaObjectPrefix}JOURNAL_IDX on ${schemaObjectPrefix}JOURNAL (REVISION_ID) ${tableSpace}
-create table ${schemaObjectPrefix}GLOBAL_REVISION (REVISION_ID number(20,0) NOT NULL) ${tableSpace}
-create unique index ${schemaObjectPrefix}GLOBAL_REVISION_IDX on ${schemaObjectPrefix}GLOBAL_REVISION (REVISION_ID) ${tableSpace}
-create table ${schemaObjectPrefix}LOCAL_REVISIONS (JOURNAL_ID varchar(255) NOT NULL, REVISION_ID number(20,0) NOT NULL)
+create table ${schemaObjectPrefix}JOURNAL (REVISION_ID number(20,0) NOT NULL, JOURNAL_ID varchar(255), PRODUCER_ID varchar(255), REVISION_DATA blob) ${tablespace}
+create unique index ${schemaObjectPrefix}JOURNAL_IDX on ${schemaObjectPrefix}JOURNAL (REVISION_ID) ${indexTablespace}
+
+create table ${schemaObjectPrefix}GLOBAL_REVISION (REVISION_ID number(20,0) NOT NULL) ${tablespace}
+create unique index ${schemaObjectPrefix}GLOBAL_REVISION_IDX on ${schemaObjectPrefix}GLOBAL_REVISION (REVISION_ID) ${indexTablespace}
+
+create table ${schemaObjectPrefix}LOCAL_REVISIONS (JOURNAL_ID varchar(255) NOT NULL, REVISION_ID number(20,0) NOT NULL) ${tablespace}
 
 # Inserting the one and only revision counter record now helps avoiding race conditions
 insert into ${schemaObjectPrefix}GLOBAL_REVISION VALUES(0)

Modified: jackrabbit/trunk/jackrabbit-core/src/main/resources/org/apache/jackrabbit/core/persistence/bundle/oracle.ddl
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/resources/org/apache/jackrabbit/core/persistence/bundle/oracle.ddl?rev=1179984&r1=1179983&r2=1179984&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/resources/org/apache/jackrabbit/core/persistence/bundle/oracle.ddl (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/resources/org/apache/jackrabbit/core/persistence/bundle/oracle.ddl Fri Oct  7 09:51:40 2011
@@ -12,16 +12,17 @@
 #  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 #  See the License for the specific language governing permissions and
 #  limitations under the License.
-create table ${schemaObjectPrefix}BUNDLE (NODE_ID raw(16) not null, BUNDLE_DATA blob not null) ${tableSpace}
-create unique index ${schemaObjectPrefix}BUNDLE_IDX on ${schemaObjectPrefix}BUNDLE (NODE_ID) ${tableSpace}
+create table ${schemaObjectPrefix}BUNDLE (NODE_ID raw(16) not null, BUNDLE_DATA blob not null) ${tablespace}
+create unique index ${schemaObjectPrefix}BUNDLE_IDX on ${schemaObjectPrefix}BUNDLE (NODE_ID) ${indexTablespace}
 
-create table ${schemaObjectPrefix}REFS (NODE_ID raw(16) not null, REFS_DATA blob not null) ${tableSpace}
-create unique index ${schemaObjectPrefix}REFS_IDX on ${schemaObjectPrefix}REFS (NODE_ID) ${tableSpace}
+create table ${schemaObjectPrefix}REFS (NODE_ID raw(16) not null, REFS_DATA blob not null) ${tablespace}
+create unique index ${schemaObjectPrefix}REFS_IDX on ${schemaObjectPrefix}REFS (NODE_ID) ${indexTablespace}
 
-create table ${schemaObjectPrefix}BINVAL (BINVAL_ID varchar2(64) not null, BINVAL_DATA blob null) ${tableSpace}
-create unique index ${schemaObjectPrefix}BINVAL_IDX on ${schemaObjectPrefix}BINVAL (BINVAL_ID) ${tableSpace}
+create table ${schemaObjectPrefix}BINVAL (BINVAL_ID varchar2(64) not null, BINVAL_DATA blob null) ${tablespace}
+create unique index ${schemaObjectPrefix}BINVAL_IDX on ${schemaObjectPrefix}BINVAL (BINVAL_ID) ${indexTablespace}
+
+create table ${schemaObjectPrefix}NAMES (ID INTEGER primary key using index ${indexTablespace}, NAME varchar2(255) not null) ${tablespace}
+create unique index ${schemaObjectPrefix}NAMES_IDX on ${schemaObjectPrefix}NAMES (NAME) ${indexTablespace}
 
-create table ${schemaObjectPrefix}NAMES (ID INTEGER primary key, NAME varchar2(255) not null) ${tableSpace}
-create unique index ${schemaObjectPrefix}NAMES_IDX on ${schemaObjectPrefix}NAMES (NAME) ${tableSpace}
 create sequence ${schemaObjectPrefix}seq_names_id
 create trigger ${schemaObjectPrefix}t1 before insert on ${schemaObjectPrefix}NAMES for each row begin select ${schemaObjectPrefix}seq_names_id.nextval into :new.id from dual; end;
\ No newline at end of file

Added: jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/OracleRepositoryTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/OracleRepositoryTest.java?rev=1179984&view=auto
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/OracleRepositoryTest.java (added)
+++ jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/OracleRepositoryTest.java Fri Oct  7 09:51:40 2011
@@ -0,0 +1,76 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jackrabbit.core;
+
+import java.io.File;
+import java.io.InputStream;
+import java.util.Properties;
+
+import javax.jcr.Session;
+
+import junit.framework.TestCase;
+
+import org.apache.commons.io.FileUtils;
+import org.apache.jackrabbit.core.config.RepositoryConfig;
+
+/**
+ * Tests the creation of a repository using Oracle persistence and different table and index tablespaces.
+ *
+ * @author Edouard Hue <edouard.hue@gmail.com>
+ */
+public class OracleRepositoryTest extends TestCase {
+    private File dir;
+
+    private RepositoryConfig config;
+
+    protected void setUp() throws Exception {
+        final Properties sysProps = System.getProperties();
+        if (!sysProps.containsKey("tests.oracle.url")
+            || !sysProps.containsKey("tests.oracle.user")
+            || !sysProps.containsKey("tests.oracle.password")
+            || !sysProps.containsKey("tests.oracle.tablespace")
+            || !sysProps.containsKey("tests.oracle.indexTablespace")) {
+            throw new IllegalStateException("Missing system property for test");
+        }
+        dir = File.createTempFile("jackrabbit_", null, new File("target"));
+        dir.delete();
+        dir.mkdir();
+        final InputStream in = getClass().getResourceAsStream(
+                "/org/apache/jackrabbit/core/repository-oracle.xml");
+        config = RepositoryConfig.create(in, dir.getPath());
+    }
+    
+    /**
+     * Attempt to start a {@link TransientRepository} using {@link #config}, open
+     * a new session with default credentials and workspace, then shutdown the repo.
+     */
+    public void testConfiguration() throws Exception {
+        final TransientRepository repo = new TransientRepository(config);
+        try {
+            final Session session = repo.login();
+            session.logout();
+        } finally {
+            repo.shutdown();
+        }
+    }
+
+    protected void tearDown() throws Exception {
+        if (dir != null) {
+            FileUtils.deleteQuietly(dir);
+        }
+    }
+}

Propchange: jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/OracleRepositoryTest.java
------------------------------------------------------------------------------
    svn:executable = *

Added: jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/OracleRetrocompatibleRepositoryTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/OracleRetrocompatibleRepositoryTest.java?rev=1179984&view=auto
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/OracleRetrocompatibleRepositoryTest.java (added)
+++ jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/OracleRetrocompatibleRepositoryTest.java Fri Oct  7 09:51:40 2011
@@ -0,0 +1,75 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jackrabbit.core;
+
+import java.io.File;
+import java.io.InputStream;
+import java.util.Properties;
+
+import javax.jcr.Session;
+
+import junit.framework.TestCase;
+
+import org.apache.commons.io.FileUtils;
+import org.apache.jackrabbit.core.config.RepositoryConfig;
+
+/**
+ * Tests the creation of a repository using Oracle persistence and no index tablespace specified.
+ *
+ * @author Edouard Hue <edouard.hue@gmail.com>
+ */
+public class OracleRetrocompatibleRepositoryTest extends TestCase {
+    private File dir;
+
+    private RepositoryConfig config;
+
+    protected void setUp() throws Exception {
+        final Properties sysProps = System.getProperties();
+        if (!sysProps.containsKey("tests.oracle.url")
+            || !sysProps.containsKey("tests.oracle.user")
+            || !sysProps.containsKey("tests.oracle.password")
+            || !sysProps.containsKey("tests.oracle.tablespace")) {
+            throw new IllegalStateException("Missing system property for test");
+        }
+        dir = File.createTempFile("jackrabbit_", null, new File("target"));
+        dir.delete();
+        dir.mkdir();
+        final InputStream in = getClass().getResourceAsStream(
+                "/org/apache/jackrabbit/core/repository-oracle-compat.xml");
+        config = RepositoryConfig.create(in, dir.getPath());
+    }
+    
+    /**
+     * Attempt to start a {@link TransientRepository} using {@link #config}, open
+     * a new session with default credentials and workspace, then shutdown the repo.
+     */
+    public void testConfiguration() throws Exception {
+        final TransientRepository repo = new TransientRepository(config);
+        try {
+            final Session session = repo.login();
+            session.logout();
+        } finally {
+            repo.shutdown();
+        }
+    }
+
+    protected void tearDown() throws Exception {
+        if (dir != null) {
+            FileUtils.deleteQuietly(dir);
+        }
+    }
+}

Propchange: jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/OracleRetrocompatibleRepositoryTest.java
------------------------------------------------------------------------------
    svn:executable = *

Added: jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/fs/db/OracleFileSystemTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/fs/db/OracleFileSystemTest.java?rev=1179984&view=auto
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/fs/db/OracleFileSystemTest.java (added)
+++ jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/fs/db/OracleFileSystemTest.java Fri Oct  7 09:51:40 2011
@@ -0,0 +1,46 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jackrabbit.core.fs.db;
+
+import org.apache.jackrabbit.core.fs.AbstractFileSystemTest;
+import org.apache.jackrabbit.core.fs.FileSystem;
+import org.apache.jackrabbit.core.util.db.ConnectionFactory;
+
+/**
+ * Tests the creation of an Oracle file system with different tablespace and index tablespace.
+ *
+ * @author Edouard Hue <edouard.hue@gmail.com>
+ */
+public class OracleFileSystemTest extends AbstractFileSystemTest {
+    private ConnectionFactory connectionFactory;
+
+    @Override
+    protected FileSystem getFileSystem() throws Exception {
+        connectionFactory = new ConnectionFactory();
+        final OracleFileSystem fs = new OracleFileSystem();
+        fs.setConnectionFactory(connectionFactory);
+        fs.setUrl(System.getProperty("tests.oracle.url"));
+        fs.setUser(System.getProperty("tests.oracle.user"));
+        fs.setPassword(System.getProperty("tests.oracle.password"));
+        fs.setDriver(System.getProperty("tests.oracle.driver", "oracle.jdbc.driver.OracleDriver"));
+        fs.setSchemaObjectPrefix(System.getProperty("tests.oracle.schemaObjectPrefix", ""));
+        fs.setTablespace(System.getProperty("tests.oracle.tablespace"));
+        fs.setIndexTablespace(System.getProperty("tests.oracle.indexTablespace"));
+        fs.setSchema("oracle");
+        return fs;
+    }
+}

Propchange: jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/fs/db/OracleFileSystemTest.java
------------------------------------------------------------------------------
    svn:executable = *

Added: jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/fs/db/OracleRetrocompatibleFileSystemTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/fs/db/OracleRetrocompatibleFileSystemTest.java?rev=1179984&view=auto
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/fs/db/OracleRetrocompatibleFileSystemTest.java (added)
+++ jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/fs/db/OracleRetrocompatibleFileSystemTest.java Fri Oct  7 09:51:40 2011
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jackrabbit.core.fs.db;
+
+import org.apache.jackrabbit.core.fs.AbstractFileSystemTest;
+import org.apache.jackrabbit.core.fs.FileSystem;
+import org.apache.jackrabbit.core.util.db.ConnectionFactory;
+
+/**
+ * Tests the creation of an Oracle file system with no index tablespace specified.
+ *
+ * @author Edouard Hue <edouard.hue@gmail.com>
+ */
+public class OracleRetrocompatibleFileSystemTest extends AbstractFileSystemTest {
+    private ConnectionFactory connectionFactory;
+
+    @Override
+    protected FileSystem getFileSystem() throws Exception {
+        connectionFactory = new ConnectionFactory();
+        final OracleFileSystem fs = new OracleFileSystem();
+        fs.setConnectionFactory(connectionFactory);
+        fs.setUrl(System.getProperty("tests.oracle.url"));
+        fs.setUser(System.getProperty("tests.oracle.user"));
+        fs.setPassword(System.getProperty("tests.oracle.password"));
+        fs.setDriver(System.getProperty("tests.oracle.driver", "oracle.jdbc.driver.OracleDriver"));
+        fs.setSchemaObjectPrefix(System.getProperty("tests.oracle.schemaObjectPrefix", ""));
+        fs.setTablespace(System.getProperty("tests.oracle.tablespace"));
+        fs.setSchema("oracle");
+        return fs;
+    }
+}

Propchange: jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/fs/db/OracleRetrocompatibleFileSystemTest.java
------------------------------------------------------------------------------
    svn:executable = *

Added: jackrabbit/trunk/jackrabbit-core/src/test/resources/org/apache/jackrabbit/core/repository-oracle-compat.xml
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/test/resources/org/apache/jackrabbit/core/repository-oracle-compat.xml?rev=1179984&view=auto
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/test/resources/org/apache/jackrabbit/core/repository-oracle-compat.xml (added)
+++ jackrabbit/trunk/jackrabbit-core/src/test/resources/org/apache/jackrabbit/core/repository-oracle-compat.xml Fri Oct  7 09:51:40 2011
@@ -0,0 +1,99 @@
+<?xml version="1.0"?>
+<!--
+   Licensed to the Apache Software Foundation (ASF) under one or more
+   contributor license agreements.  See the NOTICE file distributed with
+   this work for additional information regarding copyright ownership.
+   The ASF licenses this file to You under the Apache License, Version 2.0
+   (the "License"); you may not use this file except in compliance with
+   the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+-->
+<!DOCTYPE Repository PUBLIC "-//The Apache Software Foundation//DTD Jackrabbit 2.0//EN"
+                            "http://jackrabbit.apache.org/dtd/repository-2.0.dtd">
+<!-- Repository configuration using all of Oracle data access components (FS, PM and Journal).
+     Used by
+     - org.apache.jackrabbit.core.OracleRepositoryTest
+-->
+<Repository>
+    <FileSystem class="org.apache.jackrabbit.core.fs.db.OracleFileSystem">
+        <param name="url" value="${tests.oracle.url}"/>
+        <param name="user" value="${tests.oracle.user}"/>
+        <param name="password" value="${tests.oracle.user}"/>
+        <param name="schemaObjectPrefix" value="JCR_"/>
+        <param name="tablespace" value="${tests.oracle.tablespace}"/>
+    </FileSystem>
+
+    <Security appName="Jackrabbit">
+        <SecurityManager class="org.apache.jackrabbit.core.security.simple.SimpleSecurityManager" workspaceName="security"/>
+        <AccessManager class="org.apache.jackrabbit.core.security.simple.SimpleAccessManager"/>
+        <LoginModule class="org.apache.jackrabbit.core.security.simple.SimpleLoginModule"/>
+    </Security>
+
+    <Workspaces rootPath="${rep.home}/workspaces" defaultWorkspace="default"/>
+    <Workspace name="${wsp.name}">
+        <FileSystem class="org.apache.jackrabbit.core.fs.db.OracleFileSystem">
+            <param name="url" value="${tests.oracle.url}"/>
+            <param name="user" value="${tests.oracle.user}"/>
+            <param name="password" value="${tests.oracle.user}"/>
+            <param name="schemaObjectPrefix" value="${wsp.name}_"/>
+            <param name="tablespace" value="${tests.oracle.tablespace}"/>
+        </FileSystem>
+
+        <PersistenceManager class="org.apache.jackrabbit.core.persistence.pool.OraclePersistenceManager">
+            <param name="url" value="${tests.oracle.url}"/>
+            <param name="user" value="${tests.oracle.user}"/>
+            <param name="password" value="${tests.oracle.user}"/>
+            <param name="schemaObjectPrefix" value="${wsp.name}_"/>
+            <param name="tablespace" value="${tests.oracle.tablespace}"/>
+        </PersistenceManager>
+
+        <SearchIndex class="org.apache.jackrabbit.core.query.lucene.SearchIndex">
+            <param name="path" value="${wsp.home}/index"/>
+            <param name="textFilterClasses" value="org.apache.jackrabbit.extractor.PlainTextExtractor,org.apache.jackrabbit.extractor.MsWordTextExtractor,org.apache.jackrabbit.extractor.MsExcelTextExtractor,org.apache.jackrabbit.extractor.MsPowerPointTextExtractor,org.apache.jackrabbit.extractor.PdfTextExtractor,org.apache.jackrabbit.extractor.OpenOfficeTextExtractor,org.apache.jackrabbit.extractor.RTFTextExtractor,org.apache.jackrabbit.extractor.HTMLTextExtractor,org.apache.jackrabbit.extractor.XMLTextExtractor"/>
+            <param name="extractorPoolSize" value="2"/>
+            <param name="supportHighlighting" value="true"/>
+        </SearchIndex>
+    </Workspace>
+
+    <Versioning rootPath="${rep.home}/version">
+        <FileSystem class="org.apache.jackrabbit.core.fs.db.OracleFileSystem">
+            <param name="url" value="${tests.oracle.url}"/>
+            <param name="user" value="${tests.oracle.user}"/>
+            <param name="password" value="${tests.oracle.user}"/>
+            <param name="schemaObjectPrefix" value="V_"/>
+            <param name="tablespace" value="${tests.oracle.tablespace}"/>
+        </FileSystem>
+
+        <PersistenceManager class="org.apache.jackrabbit.core.persistence.pool.OraclePersistenceManager">
+            <param name="url" value="${tests.oracle.url}"/>
+            <param name="user" value="${tests.oracle.user}"/>
+            <param name="password" value="${tests.oracle.user}"/>
+            <param name="schemaObjectPrefix" value="V_"/>
+            <param name="tablespace" value="${tests.oracle.tablespace}"/>
+        </PersistenceManager>
+    </Versioning>
+
+    <SearchIndex class="org.apache.jackrabbit.core.query.lucene.SearchIndex">
+        <param name="path" value="${rep.home}/repository/index"/>
+        <param name="textFilterClasses" value="org.apache.jackrabbit.extractor.PlainTextExtractor,org.apache.jackrabbit.extractor.MsWordTextExtractor,org.apache.jackrabbit.extractor.MsExcelTextExtractor,org.apache.jackrabbit.extractor.MsPowerPointTextExtractor,org.apache.jackrabbit.extractor.PdfTextExtractor,org.apache.jackrabbit.extractor.OpenOfficeTextExtractor,org.apache.jackrabbit.extractor.RTFTextExtractor,org.apache.jackrabbit.extractor.HTMLTextExtractor,org.apache.jackrabbit.extractor.XMLTextExtractor"/>
+        <param name="extractorPoolSize" value="2"/>
+        <param name="supportHighlighting" value="true"/>
+    </SearchIndex>
+    
+    <Cluster>
+        <Journal class="org.apache.jackrabbit.core.journal.OracleDatabaseJournal">
+            <param name="url" value="${tests.oracle.url}"/>
+            <param name="user" value="${tests.oracle.user}"/>
+            <param name="password" value="${tests.oracle.user}"/>
+            <param name="schemaObjectPrefix" value="C_"/>
+            <param name="tablespace" value="${tests.oracle.tablespace}"/>
+        </Journal>
+    </Cluster>
+</Repository>

Propchange: jackrabbit/trunk/jackrabbit-core/src/test/resources/org/apache/jackrabbit/core/repository-oracle-compat.xml
------------------------------------------------------------------------------
    svn:executable = *

Added: jackrabbit/trunk/jackrabbit-core/src/test/resources/org/apache/jackrabbit/core/repository-oracle.xml
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/test/resources/org/apache/jackrabbit/core/repository-oracle.xml?rev=1179984&view=auto
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/test/resources/org/apache/jackrabbit/core/repository-oracle.xml (added)
+++ jackrabbit/trunk/jackrabbit-core/src/test/resources/org/apache/jackrabbit/core/repository-oracle.xml Fri Oct  7 09:51:40 2011
@@ -0,0 +1,105 @@
+<?xml version="1.0"?>
+<!--
+   Licensed to the Apache Software Foundation (ASF) under one or more
+   contributor license agreements.  See the NOTICE file distributed with
+   this work for additional information regarding copyright ownership.
+   The ASF licenses this file to You under the Apache License, Version 2.0
+   (the "License"); you may not use this file except in compliance with
+   the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+-->
+<!DOCTYPE Repository PUBLIC "-//The Apache Software Foundation//DTD Jackrabbit 2.0//EN"
+                            "http://jackrabbit.apache.org/dtd/repository-2.0.dtd">
+<!-- Repository configuration using all of Oracle data access components (FS, PM and Journal).
+     Used by
+     - org.apache.jackrabbit.core.OracleRepositoryTest
+-->
+<Repository>
+    <FileSystem class="org.apache.jackrabbit.core.fs.db.OracleFileSystem">
+        <param name="url" value="${tests.oracle.url}"/>
+        <param name="user" value="${tests.oracle.user}"/>
+        <param name="password" value="${tests.oracle.user}"/>
+        <param name="schemaObjectPrefix" value="JCR_"/>
+        <param name="tablespace" value="${tests.oracle.tablespace}"/>
+        <param name="indexTablespace" value="${tests.oracle.indexTablespace}"/>
+    </FileSystem>
+
+    <Security appName="Jackrabbit">
+        <SecurityManager class="org.apache.jackrabbit.core.security.simple.SimpleSecurityManager" workspaceName="security"/>
+        <AccessManager class="org.apache.jackrabbit.core.security.simple.SimpleAccessManager"/>
+        <LoginModule class="org.apache.jackrabbit.core.security.simple.SimpleLoginModule"/>
+    </Security>
+
+    <Workspaces rootPath="${rep.home}/workspaces" defaultWorkspace="default"/>
+    <Workspace name="${wsp.name}">
+        <FileSystem class="org.apache.jackrabbit.core.fs.db.OracleFileSystem">
+            <param name="url" value="${tests.oracle.url}"/>
+            <param name="user" value="${tests.oracle.user}"/>
+            <param name="password" value="${tests.oracle.user}"/>
+            <param name="schemaObjectPrefix" value="${wsp.name}_"/>
+            <param name="tablespace" value="${tests.oracle.tablespace}"/>
+            <param name="indexTablespace" value="${tests.oracle.indexTablespace}"/>
+        </FileSystem>
+
+        <PersistenceManager class="org.apache.jackrabbit.core.persistence.pool.OraclePersistenceManager">
+            <param name="url" value="${tests.oracle.url}"/>
+            <param name="user" value="${tests.oracle.user}"/>
+            <param name="password" value="${tests.oracle.user}"/>
+            <param name="schemaObjectPrefix" value="${wsp.name}_"/>
+            <param name="tablespace" value="${tests.oracle.tablespace}"/>
+            <param name="indexTablespace" value="${tests.oracle.indexTablespace}"/>
+        </PersistenceManager>
+
+        <SearchIndex class="org.apache.jackrabbit.core.query.lucene.SearchIndex">
+            <param name="path" value="${wsp.home}/index"/>
+            <param name="textFilterClasses" value="org.apache.jackrabbit.extractor.PlainTextExtractor,org.apache.jackrabbit.extractor.MsWordTextExtractor,org.apache.jackrabbit.extractor.MsExcelTextExtractor,org.apache.jackrabbit.extractor.MsPowerPointTextExtractor,org.apache.jackrabbit.extractor.PdfTextExtractor,org.apache.jackrabbit.extractor.OpenOfficeTextExtractor,org.apache.jackrabbit.extractor.RTFTextExtractor,org.apache.jackrabbit.extractor.HTMLTextExtractor,org.apache.jackrabbit.extractor.XMLTextExtractor"/>
+            <param name="extractorPoolSize" value="2"/>
+            <param name="supportHighlighting" value="true"/>
+        </SearchIndex>
+    </Workspace>
+
+    <Versioning rootPath="${rep.home}/version">
+        <FileSystem class="org.apache.jackrabbit.core.fs.db.OracleFileSystem">
+            <param name="url" value="${tests.oracle.url}"/>
+            <param name="user" value="${tests.oracle.user}"/>
+            <param name="password" value="${tests.oracle.user}"/>
+            <param name="schemaObjectPrefix" value="V_"/>
+            <param name="tablespace" value="${tests.oracle.tablespace}"/>
+            <param name="indexTablespace" value="${tests.oracle.indexTablespace}"/>
+        </FileSystem>
+
+        <PersistenceManager class="org.apache.jackrabbit.core.persistence.pool.OraclePersistenceManager">
+            <param name="url" value="${tests.oracle.url}"/>
+            <param name="user" value="${tests.oracle.user}"/>
+            <param name="password" value="${tests.oracle.user}"/>
+            <param name="schemaObjectPrefix" value="V_"/>
+            <param name="tablespace" value="${tests.oracle.tablespace}"/>
+            <param name="indexTablespace" value="${tests.oracle.indexTablespace}"/>
+        </PersistenceManager>
+    </Versioning>
+
+    <SearchIndex class="org.apache.jackrabbit.core.query.lucene.SearchIndex">
+        <param name="path" value="${rep.home}/repository/index"/>
+        <param name="textFilterClasses" value="org.apache.jackrabbit.extractor.PlainTextExtractor,org.apache.jackrabbit.extractor.MsWordTextExtractor,org.apache.jackrabbit.extractor.MsExcelTextExtractor,org.apache.jackrabbit.extractor.MsPowerPointTextExtractor,org.apache.jackrabbit.extractor.PdfTextExtractor,org.apache.jackrabbit.extractor.OpenOfficeTextExtractor,org.apache.jackrabbit.extractor.RTFTextExtractor,org.apache.jackrabbit.extractor.HTMLTextExtractor,org.apache.jackrabbit.extractor.XMLTextExtractor"/>
+        <param name="extractorPoolSize" value="2"/>
+        <param name="supportHighlighting" value="true"/>
+    </SearchIndex>
+    
+    <Cluster>
+        <Journal class="org.apache.jackrabbit.core.journal.OracleDatabaseJournal">
+            <param name="url" value="${tests.oracle.url}"/>
+            <param name="user" value="${tests.oracle.user}"/>
+            <param name="password" value="${tests.oracle.user}"/>
+            <param name="schemaObjectPrefix" value="C_"/>
+            <param name="tablespace" value="${tests.oracle.tablespace}"/>
+            <param name="indexTablespace" value="${tests.oracle.indexTablespace}"/>
+        </Journal>
+    </Cluster>
+</Repository>
\ No newline at end of file

Propchange: jackrabbit/trunk/jackrabbit-core/src/test/resources/org/apache/jackrabbit/core/repository-oracle.xml
------------------------------------------------------------------------------
    svn:executable = *



Mime
View raw message