jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stefan Guggisberg" <stefan.guggisb...@day.com>
Subject Re: Repository Configuration
Date Thu, 24 Apr 2008 14:56:00 GMT
hi jared

On Tue, Apr 22, 2008 at 9:39 PM, Jared Graber <jared.graber@iaccap.com> wrote:
> I'm having trouble finding information about the configuration file,
>  especially in regards to databases.
>
>  I'm want to use oracle 9 for my persistence manager and file system.

there's not a lot but you can e.g. find some information here:
http://jackrabbit.apache.org/api/1.4/org/apache/jackrabbit/core/persistence/bundle/OraclePersistenceManager.html
http://jackrabbit.apache.org/api/1.4/org/apache/jackrabbit/core/fs/db/OracleFileSystem.html

>
>  My questions:
>
>  Should every filesystem and persistence manager use different tables?

yes

>  Can they share tables?

no

>  Is it a problem to share them?

yes. every instance of DbFileSystem and BundleDbPersistenceManager require
their *own* set of tables. the reason is that their primary keys might
collide otherwise.
in order to accomplish this you need to specify distinct values for
the "schemaObjectPrefix"
parameter for each <FileSystem/> and <PersistenceManager/> elements in
your repository.xml.

an example:

   <FileSystem class="org.apache.jackrabbit.core.fs.db.OracleFileSystem">
       <param name="url" value="jdbc:oracle:thin:@127.0.0.1:1521:orcl"/>
       <param name="user" value="scott"/>
       <param name="password" value="tiger"/>
       <param name="schemaObjectPrefix" value="rep_"/>
       <param name="tableSpace" value="default"/>
  </FileSystem>

this will create the following table in user scott's default tablespace:

REP_FSENTRY


because the <WORKSPACE/> element in the repository.xml serves
as template for the indiviual per workspace configuration files
you should not use hard coded prefix values; you can use
the variable "${wsp.name}" instead.

an example:

   <FileSystem class="org.apache.jackrabbit.core.fs.db.OracleFileSystem">
       <param name="url" value="jdbc:oracle:thin:@127.0.0.1:1521:orcl"/>
       <param name="user" value="scott"/>
       <param name="password" value="tiger"/>
       <param name="schemaObjectPrefix" value="${wsp.name}_"/>
       <param name="tableSpace" value="default"/>
  </FileSystem>

assumed there's a workpsace named "foo" the following table will be
created in user scott's default tablespace:

FOO_FSENTRY


hope this helps,

cheers
stefan

>
>
>
>  Below is my initial repository xml (sorry it's long).  Am I on the right
>  track?

you have to specify distinct schemaObjectPrefix values, see above.

>
>  Btw:  I can't allow jackrabbit to create the tables (security
>  constraints) so I need them created beforehand.
>
>
>
>  <!DOCTYPE Repository PUBLIC "-//The Apache Software Foundation//DTD
>  Jackrabbit 1.4//EN"
>
>         "http://jackrabbit.apache.org/dtd/repository-1.4.dtd">
>
>
>
>  <Repository>
>
>     <FileSystem
>  class="org.apache.jackrabbit.core.fs.db.OracleFileSystem">
>
>         <param name="url"
>  value="jdbc:oracle:thin:@127.0.0.1:1521:orcl"/>
>
>         <!-- TODO: fill in URL -->
>
>         <param name="user" value=""/>
>
>         <!-- TODO: fill in username -->
>
>         <param name="password" value=""/>
>
>         <!-- TODO: fill in password -->
>
>         <param name="schemaObjectPrefix" value=""/>
>
>         <param name="tableSpace" value=""/>
>
>         <!-- TODO: fill in tablespace -->
>
>         <param name="driver" value="oracle.jdbc.OracleDriver"/>
>
>         <!--
>
>             This will change when we switch to JNDI.
>
>             Driver will be a class that is assignable to
>  javax.naming.Context
>
>             URL will be the name of the jndi resource
>
>         -->
>
>     </FileSystem>
>
>     <Security appName="Admin">
>
>         <AccessManager
>  class="org.apache.jackrabbit.core.security.SimpleAccessManager"/>
>
>         <LoginModule
>  class="org.apache.jackrabbit.core.security.SimpleLoginModule"/>
>
>     </Security>
>
>     <Workspaces rootPath="${rep.home}/workspaces"
>  defaultWorkspace="default"/>
>
>     <Workspace name="default">
>
>         <FileSystem
>  class="org.apache.jackrabbit.core.fs.db.OracleFileSystem">
>
>             <param name="url"
>  value="jdbc:oracle:thin:@127.0.0.1:1521:orcl"/>
>
>             <!-- TODO: fill in URL -->
>
>             <param name="user" value=""/>
>
>             <!-- TODO: fill in username -->
>
>             <param name="password" value=""/>
>
>             <!-- TODO: fill in password -->
>
>             <param name="schemaObjectPrefix" value=""/>
>
>             <param name="tableSpace" value=""/>
>
>             <!-- TODO: fill in tablespace -->
>
>             <param name="driver" value="oracle.jdbc.OracleDriver"/>
>
>             <!--
>
>                 This will change when we switch to JNDI.
>
>                 Driver will be a class that is assignable to
>  javax.naming.Context
>
>                 URL will be the name of the jndi resource
>
>             -->
>
>         </FileSystem>
>
>         <PersistenceManager
>  class="org.apache.jackrabbit.core.persistence.bundle.Oracle9PersistenceM
>  anager">
>
>             <param name="bundleCacheSize" value="8"/>
>
>             <param name="consistencyCheck" value="false"/>
>
>             <param name="minBlobSize" value="16384"/>
>
>             <param name="driver" value="oracle.jdbc.OracleDriverr"/>
>
>             <param name="url"
>  value="jdbc:oracle:thin:@127.0.0.1:1521:xe"/> <!-- TODO: fill in URL -->
>
>             <param name="user" value="crx"/> <!-- TODO: fill in user -->
>
>             <param name="password" value="crx"/> <!-- TODO: fill in
>  password -->
>
>             <param name="schema" value="oracle"/>
>
>             <param name="schemaObjectPrefix" value=""/>
>
>             <param name="errorHandling" value=""/>
>
>             <param name="tableSpace" value=""/> <!-- TODO: fill in table
>  space -->
>
>         </PersistenceManager>
>
>         <SearchIndex
>  class="org.apache.jackrabbit.core.query.lucene.SearchIndex">
>
>             <param name="path" value="${wsp.home}/index"/>
>
>             <param name="textFilterClasses"
>
>
>  value="org.apache.jackrabbit.extractor.MsWordTextExtractor,org.apache.ja
>  ckrabbit.extractor.MsExcelTextExtractor,org.apache.jackrabbit.extractor.
>  MsPowerPointTextExtractor,org.apache.jackrabbit.extractor.PdfTextExtract
>  or,org.apache.jackrabbit.extractor.OpenOfficeTextExtractor,org.apache.ja
>  ckrabbit.extractor.RTFTextExtractor,org.apache.jackrabbit.extractor.HTML
>  TextExtractor,org.apache.jackrabbit.extractor.XMLTextExtractor"/>
>
>             <param name="extractorPoolSize" value="2"/>
>
>             <param name="supportHighlighting" value="false"/>
>
>         </SearchIndex>
>
>     </Workspace>
>
>     <Versioning rootPath="${rep.home}/version">
>
>         <FileSystem
>  class="org.apache.jackrabbit.core.fs.db.OracleFileSystem">
>
>             <param name="url"
>  value="jdbc:oracle:thin:@127.0.0.1:1521:orcl"/>
>
>             <!-- TODO: fill in URL -->
>
>             <param name="user" value=""/>
>
>             <!-- TODO: fill in username -->
>
>             <param name="password" value=""/>
>
>             <!-- TODO: fill in password -->
>
>             <param name="schemaObjectPrefix" value=""/>
>
>             <param name="tableSpace" value=""/>
>
>             <!-- TODO: fill in tablespace -->
>
>             <param name="driver" value="oracle.jdbc.OracleDriver"/>
>
>             <!--
>
>                 This will change when we switch to JNDI.
>
>                 Driver will be a class that is assignable to
>  javax.naming.Context
>
>                 URL will be the name of the jndi resource
>
>             -->
>
>         </FileSystem>
>
>         <PersistenceManager
>  class="org.apache.jackrabbit.core.persistence.bundle.Oracle9PersistenceM
>  anager">
>
>             <param name="bundleCacheSize" value="8"/>
>
>             <param name="consistencyCheck" value="false"/>
>
>             <param name="minBlobSize" value="16384"/>
>
>             <param name="driver" value="oracle.jdbc.OracleDriverr"/>
>
>             <param name="url"
>  value="jdbc:oracle:thin:@127.0.0.1:1521:xe"/> <!-- TODO: fill in URL -->
>
>             <param name="user" value="crx"/> <!-- TODO: fill in user -->
>
>             <param name="password" value="crx"/> <!-- TODO: fill in
>  password -->
>
>             <param name="schema" value="oracle"/>
>
>             <param name="schemaObjectPrefix" value=""/>
>
>             <param name="errorHandling" value=""/>
>
>             <param name="tableSpace" value=""/> <!-- TODO: fill in table
>  space -->
>
>         </PersistenceManager>
>
>     </Versioning>
>
>     <SearchIndex
>  class="org.apache.jackrabbit.core.query.lucene.SearchIndex">
>
>         <param name="path" value="default/index"/>
>
>         <param name="textFilterClasses"
>
>
>  value="org.apache.jackrabbit.extractor.MsWordTextExtractor,org.apache.ja
>  ckrabbit.extractor.MsExcelTextExtractor,org.apache.jackrabbit.extractor.
>  MsPowerPointTextExtractor,org.apache.jackrabbit.extractor.PdfTextExtract
>  or,org.apache.jackrabbit.extractor.OpenOfficeTextExtractor,org.apache.ja
>  ckrabbit.extractor.RTFTextExtractor,org.apache.jackrabbit.extractor.HTML
>  TextExtractor,org.apache.jackrabbit.extractor.XMLTextExtractor"/>
>
>         <param name="extractorPoolSize" value="2"/>
>
>         <param name="supportHighlighting" value="false"/>
>
>     </SearchIndex>
>
>  </Repository>
>
>

Mime
View raw message