Return-Path: X-Original-To: apmail-jackrabbit-oak-commits-archive@minotaur.apache.org Delivered-To: apmail-jackrabbit-oak-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 017091048D for ; Fri, 14 Feb 2014 12:47:17 +0000 (UTC) Received: (qmail 81860 invoked by uid 500); 14 Feb 2014 12:47:16 -0000 Delivered-To: apmail-jackrabbit-oak-commits-archive@jackrabbit.apache.org Received: (qmail 81802 invoked by uid 500); 14 Feb 2014 12:47:12 -0000 Mailing-List: contact oak-commits-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: oak-dev@jackrabbit.apache.org Delivered-To: mailing list oak-commits@jackrabbit.apache.org Received: (qmail 81786 invoked by uid 99); 14 Feb 2014 12:47:10 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 14 Feb 2014 12:47:10 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 14 Feb 2014 12:47:08 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id B3F27238899C; Fri, 14 Feb 2014 12:46:48 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1568258 - /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentMK.java Date: Fri, 14 Feb 2014 12:46:48 -0000 To: oak-commits@jackrabbit.apache.org From: reschke@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20140214124648.B3F27238899C@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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.