Index: C:/Work/Experiments/jackrabbit-trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/util/MSSqlHelperTest.java
===================================================================
--- C:/Work/Experiments/jackrabbit-trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/util/MSSqlHelperTest.java (revision 0)
+++ C:/Work/Experiments/jackrabbit-trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/util/MSSqlHelperTest.java (revision 0)
@@ -0,0 +1,43 @@
+/*
+ * 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.util;
+
+import org.apache.jackrabbit.test.AbstractJCRTest;
+import org.apache.jackrabbit.core.util.MSSqlHelper;
+
+/**
+ * Test the functions in the MSSqlHelper class.
+ *
+ * @author vkalyan
+ */
+public class MSSqlHelperTest extends AbstractJCRTest {
+
+ /**
+ * A very basic, very simple positive test for the MSSqlHelper.setTablespace function.
+ *
+ * @throws Exception
+ */
+ public void testSetTablespace() throws Exception {
+ String sql = "create table my_test_table ${tableSpace}";
+ String tableSpace = "my_tablespace";
+ String sqlExpected = "create table my_test_table on my_tablespace";
+
+ String sqlActual = MSSqlHelper.setTablespace(sql, tableSpace);
+
+ super.assertEquals("Tablespace variable replacement failed.", sqlExpected, sqlActual);
+ }
+}
Index: C:/Work/Experiments/jackrabbit-trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/util/TestAll.java
===================================================================
--- C:/Work/Experiments/jackrabbit-trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/util/TestAll.java (revision 607291)
+++ C:/Work/Experiments/jackrabbit-trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/util/TestAll.java (working copy)
@@ -33,6 +33,7 @@
public static Test suite() {
TestSuite suite = new TestSuite("Utility tests");
suite.addTestSuite(RepositoryLockTest.class);
+ suite.addTestSuite(MSSqlHelperTest.class);
return suite;
}
}
Index: C:/Work/Experiments/jackrabbit-trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/db/MSSqlPersistenceManager.java
===================================================================
--- C:/Work/Experiments/jackrabbit-trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/db/MSSqlPersistenceManager.java (revision 0)
+++ C:/Work/Experiments/jackrabbit-trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/db/MSSqlPersistenceManager.java (revision 0)
@@ -0,0 +1,133 @@
+/*
+ * 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.persistence.db;
+
+import org.apache.jackrabbit.core.persistence.PMContext;
+import org.apache.jackrabbit.core.persistence.util.Serializer;
+import org.apache.jackrabbit.core.state.NodeReferences;
+import org.apache.jackrabbit.core.state.ItemStateException;
+import org.apache.jackrabbit.core.state.NodeState;
+import org.apache.jackrabbit.core.state.PropertyState;
+import org.apache.jackrabbit.core.state.ItemState;
+import org.apache.jackrabbit.core.util.MSSqlHelper;
+import org.apache.jackrabbit.util.Text;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.jcr.RepositoryException;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.ByteArrayInputStream;
+import java.io.BufferedReader;
+import java.io.InputStreamReader;
+import java.lang.reflect.Method;
+import java.sql.Blob;
+import java.sql.Connection;
+import java.sql.ResultSet;
+import java.sql.DatabaseMetaData;
+import java.sql.Statement;
+
+/**
+ * MSSqlPersistenceManager is a JDBC-based
+ * PersistenceManager for Jackrabbit that persists
+ * ItemState and NodeReferences objects in MS SQL
+ * 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:
+ *
+ * driver: the FQN name of the JDBC driver class
+ * (default: "com.microsoft.sqlserver.jdbc.SQLServerDriver")
+ * schema: type of schema to be used
+ * (default: "mssql")
+ * url: the database url (e.g.
+ * "jdbc:microsoft:sqlserver://[host]:[port];databaseName=[dbname]")
+ * user: the database user
+ * password: the user's password
+ * schemaObjectPrefix: prefix to be prepended to schema objects
+ * tableSpace: the tablespace to use
+ * externalBLOBs: if true (the default) BINARY
+ * values (BLOBs) are stored in the local file system;
+ * if false BLOBs are stored in the database
+ *
+ * See also {@link SimpleDbPersistenceManager}.
+ *
+ * The following is a fragment from a sample configuration:
+ *
+ * <PersistenceManager class="org.apache.jackrabbit.core.persistence.db.MSSqlPersistenceManager">
+ * <param name="url" value="jdbc:microsoft:sqlserver://localhost:1433;mydb"/>
+ * <param name="user" value="mydba"/>
+ * <param name="password" value="mydba"/>
+ * <param name="schemaObjectPrefix" value="${wsp.name}_"/>
+ * <param name="tableSpace" value=""/>
+ * <param name="externalBLOBs" value="false"/>
+ * </PersistenceManager>
+ *
+ */
+public class MSSqlPersistenceManager extends SimpleDbPersistenceManager {
+
+ /** the variable for the Oracle table space */
+ public static final String TABLE_SPACE_VARIABLE = "${tableSpace}";
+
+ /** the Oracle table space to use */
+ protected String tableSpace;
+
+ /**
+ * Creates a new OraclePersistenceManager instance.
+ */
+ public MSSqlPersistenceManager() {
+ // preset some attributes to reasonable defaults
+ schema = "mssql";
+ driver = "com.microsoft.sqlserver.jdbc.SQLServerDriver";
+ schemaObjectPrefix = "";
+ user = "";
+ password = "";
+ initialized = false;
+ 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) {
+ this.tableSpace = tableSpace.trim();
+ } else {
+ this.tableSpace = null;
+ }
+ }
+
+ protected String createSchemaSql(String sql) {
+ // replace prefix variable
+ sql = super.createSchemaSql(sql);
+
+ return MSSqlHelper.setTablespace(sql, tableSpace);
+ }
+}
+
Index: C:/Work/Experiments/jackrabbit-trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/MSSqlPersistenceManager.java
===================================================================
--- C:/Work/Experiments/jackrabbit-trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/MSSqlPersistenceManager.java (revision 607291)
+++ C:/Work/Experiments/jackrabbit-trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/MSSqlPersistenceManager.java (working copy)
@@ -17,6 +17,8 @@
package org.apache.jackrabbit.core.persistence.bundle;
import org.apache.jackrabbit.core.persistence.PMContext;
+import org.apache.jackrabbit.core.util.MSSqlHelper;
+import org.apache.jackrabbit.util.Text;
/**
* Extends the {@link BundleDbPersistenceManager} by MS-SQL specific code.
@@ -33,12 +35,19 @@
* <param name="{@link #setSchema(String) schema}" value="mssql"/>
* <param name="{@link #setSchemaObjectPrefix(String) schemaObjectPrefix}" value=""/>
* <param name="{@link #setErrorHandling(String) errorHandling}" value=""/>
+ * <param name="{@link #setTableSpace(String) tableSpace}" value=""/>
*
*/
public class MSSqlPersistenceManager extends BundleDbPersistenceManager {
/** the cvs/svn id */
static final String CVS_ID = "$URL$ $Rev$ $Date$";
+
+ /** the variable for the Oracle table space */
+ public static final String TABLE_SPACE_VARIABLE = "${tableSpace}";
+
+ /** the MS SQL table space to use */
+ protected String tableSpace;
/**
* {@inheritDoc}
@@ -54,4 +63,31 @@
super.init(context);
}
+ protected String createSchemaSQL(String sql) {
+ sql = Text.replace(sql, SCHEMA_OBJECT_PREFIX_VARIABLE, schemaObjectPrefix).trim();
+
+ return MSSqlHelper.setTablespace(sql, tableSpace);
+ }
+
+ /**
+ * Returns the configured MS SQL table space.
+ *
+ * @return the configured MS SQL table space.
+ */
+ public String getTableSpace() {
+ return tableSpace;
+ }
+
+ /**
+ * Sets the MS SQL table space.
+ *
+ * @param tableSpace the MS SQL table space.
+ */
+ public void setTableSpace(String tableSpace) {
+ if (tableSpace != null) {
+ this.tableSpace = tableSpace.trim();
+ } else {
+ this.tableSpace = null;
+ }
+ }
}
Index: C:/Work/Experiments/jackrabbit-trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/fs/db/MSSqlFileSystem.java
===================================================================
--- C:/Work/Experiments/jackrabbit-trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/fs/db/MSSqlFileSystem.java (revision 0)
+++ C:/Work/Experiments/jackrabbit-trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/fs/db/MSSqlFileSystem.java (revision 0)
@@ -0,0 +1,100 @@
+/*
+ * 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.util.Text;
+import org.apache.jackrabbit.core.util.MSSqlHelper;
+
+/**
+ * MSSqlFileSystem is a JDBC-based FileSystem
+ * implementation for Jackrabbit that persists file system entries in an
+ * MS SQL database.
+ *
+ * It is configured through the following properties:
+ *
+ * driver: the FQN name of the JDBC driver class
+ * (default: "com.microsoft.sqlserver.jdbc.SQLServerDriver")
+ * schema: type of schema to be used
+ * (default: "mssql")
+ * url: the database url (e.g.
+ * "jdbc:sqlserver://[host]:[port];<params>")
+ * user: the database user
+ * password: the user's password
+ * schemaObjectPrefix: prefix to be prepended to schema objects
+ * tableSpace: the tablespace to use
+ *
+ * See also {@link DbFileSystem}.
+ *
+ * The following is a fragment from a sample configuration:
+ *
+ * <FileSystem class="org.apache.jackrabbit.core.fs.db.MSSqlFileSystem">
+ * <param name="url" value="jdbc:sqlserver://localhost:1433"/>
+ * <param name="user" value="padv25"/>
+ * <param name="password" value="padv25"/>
+ * <param name="schemaObjectPrefix" value="rep_"/>
+ * <param name="tableSpace" value="default"/>
+ * </FileSystem>
+ *
+ */
+public class MSSqlFileSystem extends DbFileSystem {
+
+ /** the variable for the MS SQL table space */
+ public static final String TABLE_SPACE_VARIABLE = "${tableSpace}";
+
+ /** the MS SQL table space to use */
+ protected String tableSpace;
+
+ /**
+ * Returns the configured MS SQL table space.
+ * @return the configured MS SQL table space.
+ */
+ public String getTableSpace() {
+ return tableSpace;
+ }
+
+ /**
+ * Sets the MS SQL table space.
+ * @param tableSpace the MS SQL table space.
+ */
+ public void setTableSpace(String tableSpace) {
+ if (tableSpace != null) {
+ this.tableSpace = tableSpace.trim();
+ } else {
+ this.tableSpace = null;
+ }
+ }
+
+ /**
+ * Creates a new MS SQLFileSystem instance.
+ */
+ public MSSqlFileSystem() {
+ // preset some attributes to reasonable defaults
+ schema = "mssql";
+ driver = "com.microsoft.sqlserver.jdbc.SQLServerDriver";
+ schemaObjectPrefix = "";
+ user = "";
+ password = "";
+ tableSpace = null;
+ initialized = false;
+ }
+
+ protected String createSchemaSql(String sql) {
+ sql = super.createSchemaSql(sql);
+
+ return MSSqlHelper.setTablespace(sql, tableSpace);
+ }
+}
Index: C:/Work/Experiments/jackrabbit-trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/journal/MSSqlDatabaseJournal.java
===================================================================
--- C:/Work/Experiments/jackrabbit-trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/journal/MSSqlDatabaseJournal.java (revision 0)
+++ C:/Work/Experiments/jackrabbit-trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/journal/MSSqlDatabaseJournal.java (revision 0)
@@ -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.journal;
+
+import org.apache.jackrabbit.util.Text;
+import org.apache.jackrabbit.core.util.MSSqlHelper;
+
+/**
+ * It has the following property in addition to those of the DatabaseJournal:
+ *
+ * tableSpace: the MS SQL tablespace to use
+ *
+ */
+public class MSSqlDatabaseJournal extends DatabaseJournal {
+
+ /** the variable for the MS SQL table space */
+ public static final String TABLE_SPACE_VARIABLE = "${tableSpace}";
+
+ /** the MS SQL table space to use */
+ protected String tableSpace;
+
+ /**
+ * Initialize this instance with the default schema and
+ * driver values.
+ */
+ public MSSqlDatabaseJournal() {
+ tableSpace = null;
+
+ setDriver("com.microsoft.sqlserver.jdbc.SQLServerDriver");
+ setSchema("mssql");
+ }
+
+ /**
+ * Returns the configured MS SQL table space.
+ * @return the configured MS SQL table space.
+ */
+ public String getTableSpace() {
+ return tableSpace;
+ }
+
+ /**
+ * Sets the MS SQL table space.
+ * @param tableSpace the MS SQL table space.
+ */
+ public void setTableSpace(String tableSpace) {
+ if (tableSpace != null) {
+ this.tableSpace = tableSpace.trim();
+ } else {
+ this.tableSpace = null;
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ protected String createSchemaSQL(String sql) {
+ // replace the schemaObjectPrefix
+ sql = super.createSchemaSQL(sql);
+
+ return MSSqlHelper.setTablespace(sql, tableSpace);
+ }
+}
Index: C:/Work/Experiments/jackrabbit-trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/util/MSSqlHelper.java
===================================================================
--- C:/Work/Experiments/jackrabbit-trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/util/MSSqlHelper.java (revision 0)
+++ C:/Work/Experiments/jackrabbit-trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/util/MSSqlHelper.java (revision 0)
@@ -0,0 +1,56 @@
+/*
+ * 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.util;
+
+import org.apache.jackrabbit.util.Text;
+
+/**
+ * Utility class containing methods used by SQL Server related classes. Note that tablespaces
+ * are referred to as filegroups in MS SQL Server.
+ *
+ * @author vkalyan
+ */
+public class MSSqlHelper {
+
+ /** The tablespace/filegroup wildcard used in DDL files for MS SQL Server. */
+ private static final String TABLE_SPACE_VARIABLE = "${tableSpace}";
+
+ /**
+ * Replace occurrences of the {@link #TABLE_SPACE_VARIABLE} with a SQL fragment.
+ *
+ * @param sql The original SQL statement with tablespace wildcards.
+ * @param tableSpaceName The tablespace name.
+ * @return A SQL string with the table space variable reference replaced with a SQL fragment.
+ * @throws IllegalArgumentException If the input SQL string is invalid.
+ */
+ public static final String setTablespace (String sql, String tableSpaceName) {
+
+ if (null == sql) {
+ throw new IllegalArgumentException("Invalid SQL statement. Cannot be NULL.");
+ }
+
+ String tspaceSql;
+
+ if (null == tableSpaceName || tableSpaceName.length() <= 0) {
+ tspaceSql = "";
+ } else {
+ tspaceSql = "on " + tableSpaceName;
+ }
+
+ return Text.replace(sql, TABLE_SPACE_VARIABLE, tspaceSql);
+ }
+}
Index: C:/Work/Experiments/jackrabbit-trunk/jackrabbit-core/src/main/resources/org/apache/jackrabbit/core/persistence/db/mssql.ddl
===================================================================
--- C:/Work/Experiments/jackrabbit-trunk/jackrabbit-core/src/main/resources/org/apache/jackrabbit/core/persistence/db/mssql.ddl (revision 607291)
+++ C:/Work/Experiments/jackrabbit-trunk/jackrabbit-core/src/main/resources/org/apache/jackrabbit/core/persistence/db/mssql.ddl (working copy)
@@ -12,11 +12,11 @@
# 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}NODE (NODE_ID char(36) not null, NODE_DATA image not null)
-create unique index ${schemaObjectPrefix}NODE_IDX on ${schemaObjectPrefix}NODE (NODE_ID)
-create table ${schemaObjectPrefix}PROP (PROP_ID varchar(1024) not null, PROP_DATA image not null)
-create unique index ${schemaObjectPrefix}PROP_IDX on ${schemaObjectPrefix}PROP (PROP_ID)
-create table ${schemaObjectPrefix}REFS (NODE_ID char(36) not null, REFS_DATA image not null)
-create unique index ${schemaObjectPrefix}REFS_IDX on ${schemaObjectPrefix}REFS (NODE_ID)
-create table ${schemaObjectPrefix}BINVAL (BINVAL_ID varchar(1024) not null, BINVAL_DATA image not null)
-create unique index ${schemaObjectPrefix}BINVAL_IDX on ${schemaObjectPrefix}BINVAL (BINVAL_ID)
+create table ${schemaObjectPrefix}NODE (NODE_ID char(36) not null, NODE_DATA image not null) ${tableSpace}
+create unique index ${schemaObjectPrefix}NODE_IDX on ${schemaObjectPrefix}NODE (NODE_ID) ${tableSpace}
+create table ${schemaObjectPrefix}PROP (PROP_ID varchar(1024) not null, PROP_DATA image not null) ${tableSpace}
+create unique index ${schemaObjectPrefix}PROP_IDX on ${schemaObjectPrefix}PROP (PROP_ID) ${tableSpace}
+create table ${schemaObjectPrefix}REFS (NODE_ID char(36) not null, REFS_DATA image not null) ${tableSpace}
+create unique index ${schemaObjectPrefix}REFS_IDX on ${schemaObjectPrefix}REFS (NODE_ID) ${tableSpace}
+create table ${schemaObjectPrefix}BINVAL (BINVAL_ID varchar(1024) not null, BINVAL_DATA image not null) ${tableSpace}
+create unique index ${schemaObjectPrefix}BINVAL_IDX on ${schemaObjectPrefix}BINVAL (BINVAL_ID) ${tableSpace}
Index: C:/Work/Experiments/jackrabbit-trunk/jackrabbit-core/src/main/resources/org/apache/jackrabbit/core/persistence/bundle/mssql.ddl
===================================================================
--- C:/Work/Experiments/jackrabbit-trunk/jackrabbit-core/src/main/resources/org/apache/jackrabbit/core/persistence/bundle/mssql.ddl (revision 607291)
+++ C:/Work/Experiments/jackrabbit-trunk/jackrabbit-core/src/main/resources/org/apache/jackrabbit/core/persistence/bundle/mssql.ddl (working copy)
@@ -1,7 +1,7 @@
-create table ${schemaObjectPrefix}BUNDLE (NODE_ID binary(16) not null, BUNDLE_DATA image not null)
-create unique index ${schemaObjectPrefix}BUNDLE_IDX on ${schemaObjectPrefix}BUNDLE (NODE_ID)
-create table ${schemaObjectPrefix}REFS (NODE_ID binary(16) not null, REFS_DATA image not null)
-create unique index ${schemaObjectPrefix}REFS_IDX on ${schemaObjectPrefix}REFS (NODE_ID)
-create table ${schemaObjectPrefix}BINVAL (BINVAL_ID varchar(64) not null, BINVAL_DATA image not null)
-create unique index ${schemaObjectPrefix}BINVAL_IDX on ${schemaObjectPrefix}BINVAL (BINVAL_ID)
-create table ${schemaObjectPrefix}NAMES (ID INTEGER IDENTITY(1,1) PRIMARY KEY, NAME varchar(255) COLLATE Latin1_General_CS_AS not null)
\ No newline at end of file
+create table ${schemaObjectPrefix}BUNDLE (NODE_ID binary(16) not null, BUNDLE_DATA image not null) ${tableSpace}
+create unique index ${schemaObjectPrefix}BUNDLE_IDX on ${schemaObjectPrefix}BUNDLE (NODE_ID) ${tableSpace}
+create table ${schemaObjectPrefix}REFS (NODE_ID binary(16) not null, REFS_DATA image not null) ${tableSpace}
+create unique index ${schemaObjectPrefix}REFS_IDX on ${schemaObjectPrefix}REFS (NODE_ID) ${tableSpace}
+create table ${schemaObjectPrefix}BINVAL (BINVAL_ID varchar(64) not null, BINVAL_DATA image not null) ${tableSpace}
+create unique index ${schemaObjectPrefix}BINVAL_IDX on ${schemaObjectPrefix}BINVAL (BINVAL_ID) ${tableSpace}
+create table ${schemaObjectPrefix}NAMES (ID INTEGER IDENTITY(1,1) PRIMARY KEY, NAME varchar(255) COLLATE Latin1_General_CS_AS not null) ${tableSpace}
Index: C:/Work/Experiments/jackrabbit-trunk/jackrabbit-core/src/main/resources/org/apache/jackrabbit/core/fs/db/mssql.ddl
===================================================================
--- C:/Work/Experiments/jackrabbit-trunk/jackrabbit-core/src/main/resources/org/apache/jackrabbit/core/fs/db/mssql.ddl (revision 607291)
+++ C:/Work/Experiments/jackrabbit-trunk/jackrabbit-core/src/main/resources/org/apache/jackrabbit/core/fs/db/mssql.ddl (working copy)
@@ -12,5 +12,6 @@
# 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 varchar(2048) not null, FSENTRY_NAME varchar(255) not null, FSENTRY_DATA image null, FSENTRY_LASTMOD bigint not null, FSENTRY_LENGTH bigint not null)
-create unique index ${schemaObjectPrefix}FSENTRY_IDX on ${schemaObjectPrefix}FSENTRY (FSENTRY_PATH, FSENTRY_NAME)
+create table ${schemaObjectPrefix}FSENTRY (FSENTRY_PATH varchar(2048) not null, FSENTRY_NAME varchar(255) not null, FSENTRY_DATA image null, FSENTRY_LASTMOD bigint not null, FSENTRY_LENGTH bigint not null) ${tableSpace}
+create unique index ${schemaObjectPrefix}FSENTRY_IDX on ${schemaObjectPrefix}FSENTRY (FSENTRY_PATH, FSENTRY_NAME) ${tableSpace}
+
Index: C:/Work/Experiments/jackrabbit-trunk/jackrabbit-core/src/main/resources/org/apache/jackrabbit/core/journal/mssql.ddl
===================================================================
--- C:/Work/Experiments/jackrabbit-trunk/jackrabbit-core/src/main/resources/org/apache/jackrabbit/core/journal/mssql.ddl (revision 607291)
+++ C:/Work/Experiments/jackrabbit-trunk/jackrabbit-core/src/main/resources/org/apache/jackrabbit/core/journal/mssql.ddl (working copy)
@@ -1,7 +1,7 @@
-create table ${schemaObjectPrefix}JOURNAL (REVISION_ID BIGINT NOT NULL, JOURNAL_ID varchar(255), PRODUCER_ID varchar(255), REVISION_DATA IMAGE)
-create unique index ${schemaObjectPrefix}JOURNAL_IDX on ${schemaObjectPrefix}JOURNAL (REVISION_ID)
-create table ${schemaObjectPrefix}GLOBAL_REVISION (REVISION_ID BIGINT NOT NULL)
-create unique index ${schemaObjectPrefix}GLOBAL_REVISION_IDX on ${schemaObjectPrefix}GLOBAL_REVISION (REVISION_ID)
+create table ${schemaObjectPrefix}JOURNAL (REVISION_ID BIGINT NOT NULL, JOURNAL_ID varchar(255), PRODUCER_ID varchar(255), REVISION_DATA IMAGE) ${tableSpace}
+create unique index ${schemaObjectPrefix}JOURNAL_IDX on ${schemaObjectPrefix}JOURNAL (REVISION_ID) ${tableSpace}
+create table ${schemaObjectPrefix}GLOBAL_REVISION (REVISION_ID BIGINT NOT NULL) ${tableSpace}
+create unique index ${schemaObjectPrefix}GLOBAL_REVISION_IDX on ${schemaObjectPrefix}GLOBAL_REVISION (REVISION_ID) ${tableSpace}
# Inserting the one and only revision counter record now helps avoiding race conditions
insert into ${schemaObjectPrefix}GLOBAL_REVISION VALUES(0)