Return-Path: Delivered-To: apmail-jackrabbit-users-archive@minotaur.apache.org Received: (qmail 42063 invoked from network); 14 Apr 2009 08:15:32 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 14 Apr 2009 08:15:32 -0000 Received: (qmail 47030 invoked by uid 500); 14 Apr 2009 08:15:31 -0000 Delivered-To: apmail-jackrabbit-users-archive@jackrabbit.apache.org Received: (qmail 46987 invoked by uid 500); 14 Apr 2009 08:15:31 -0000 Mailing-List: contact users-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@jackrabbit.apache.org Delivered-To: mailing list users@jackrabbit.apache.org Received: (qmail 46976 invoked by uid 99); 14 Apr 2009 08:15:31 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 14 Apr 2009 08:15:31 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of aklimets@day.com designates 207.126.148.181 as permitted sender) Received: from [207.126.148.181] (HELO eu3sys201aog001.obsmtp.com) (207.126.148.181) by apache.org (qpsmtpd/0.29) with SMTP; Tue, 14 Apr 2009 08:15:22 +0000 Received: from source ([209.85.219.172]) by eu3sys201aob001.postini.com ([207.126.154.11]) with SMTP ID DSNKSeRGBpbDqPX8Wsc62QV0bkWtdwDpdAbw@postini.com; Tue, 14 Apr 2009 08:15:02 UTC Received: by ewy20 with SMTP id 20so5612709ewy.33 for ; Tue, 14 Apr 2009 01:15:01 -0700 (PDT) MIME-Version: 1.0 Received: by 10.210.86.10 with SMTP id j10mr2484326ebb.24.1239696901899; Tue, 14 Apr 2009 01:15:01 -0700 (PDT) In-Reply-To: <279a90ff0904140031y744a30fbi5be5447527086c02@mail.gmail.com> References: <279a90ff0904140031y744a30fbi5be5447527086c02@mail.gmail.com> Date: Tue, 14 Apr 2009 10:15:01 +0200 Message-ID: Subject: Re: Using different ddl for other DB's? From: Alexander Klimetschek To: users@jackrabbit.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org On Tue, Apr 14, 2009 at 9:31 AM, Taeho Kang wrote: > I'm faced with a problem of setting up JackRabbit with a "not-so-common" > database system. > I know I have to write a new schema.ddl file, but I don't know how it can be > loaded. > In which directory/package should I place the new ddl file? It's loaded from the classpath and is placed in the same java package as the class using it (persistence manager or database filesystem). The only thing mentioned in the repository xml is the basename of the file. The classpath depends on the servlet container / jvm context, but for a webapp you can put it into WEB-INF/classes. For a bundle persistence manager this gives you: WEB-INF/classes/org/apache/jackrabbit/core/persistence/bundle/.ddl Please note that you might have to write your own BundleDbPersistenceManager if the database behaves very different. You would subclass it and overwrite some of the methods to align data types and other things like that. You should also look at the code - here are the svn trunk links for the mentioned implementations and their built-in schema files: Bundle DB PM: https://svn.apache.org/repos/asf/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/ https://svn.apache.org/repos/asf/jackrabbit/trunk/jackrabbit-core/src/main/resources/org/apache/jackrabbit/core/persistence/bundle/ DB Filesystem: https://svn.apache.org/repos/asf/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/fs/db/ https://svn.apache.org/repos/asf/jackrabbit/trunk/jackrabbit-core/src/main/resources/org/apache/jackrabbit/core/fs/db/ Regards, Alex -- Alexander Klimetschek alexander.klimetschek@day.com