On Tue, Apr 14, 2009 at 9:31 AM, Taeho Kang <[email protected]> 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/<myschema>.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 [email protected]
