Author: reschke
Date: Fri Feb 14 12:46:48 2014
New Revision: 1568258
URL: http://svn.apache.org/r1568258
Log:
OAK-1266 - document store and blob store can be in different locations
Modified:
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentMK.java
Modified:
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentMK.java
URL:
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentMK.java?rev=1568258&r1=1568257&r2=1568258&view=diff
==============================================================================
---
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentMK.java
(original)
+++
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentMK.java
Fri Feb 14 12:46:48 2014
@@ -473,7 +473,8 @@ public class DocumentMK implements Micro
}
/**
- * Sets a JDBC connection URL to use for the RDB document store.
+ * Sets a JDBC connection URL to use for the RDB document and blob
+ * stores.
*
* @return this
*/
@@ -486,19 +487,43 @@ public class DocumentMK implements Micro
}
/**
- * Sets a {@link DataSource} to use for the RDB document store.
+ * Sets a JDBC connection URLs to use for the RDB document and blob
+ * stores.
+ *
+ * @return this
+ */
+ public Builder setRDBConnection(String dsjdbcurl, String dsusername,
String dspassword, String bsjdbcurl,
+ String bsusername, String bspassword) {
+ this.documentStore = new RDBDocumentStore(dsjdbcurl, dsusername,
dspassword);
+ this.blobStore = new RDBBlobStore(bsjdbcurl, bsusername,
bspassword);
+ return this;
+ }
+
+ /**
+ * Sets a {@link DataSource} to use for the RDB document and blob
+ * stores.
*
* @return this
*/
public Builder setRDBConnection(DataSource ds) {
- // TODO maybe we need different connections for document store and
- // node store
this.documentStore = new RDBDocumentStore(ds);
this.blobStore = new RDBBlobStore(ds);
return this;
}
/**
+ * Sets a {@link DataSource}s to use for the RDB document and blob
+ * stores.
+ *
+ * @return this
+ */
+ public Builder setRDBConnection(DataSource documentStoreDataSource,
DataSource blobStoreDataSource) {
+ this.documentStore = new RDBDocumentStore(documentStoreDataSource);
+ this.blobStore = new RDBBlobStore(blobStoreDataSource);
+ return this;
+ }
+
+ /**
* Use the timing document store wrapper.
*
* @param timing whether to use the timing wrapper.