Differences between revisions 4 and 5
Revision 4 as of 2009-09-20 23:45:05
Size: 927
Editor: localhost
Comment: converted to 1.6 markup
Revision 5 as of 2009-10-13 09:03:47
Size: 1267
Comment: JNDI data source are supported by DbFileSystem
Deletions are marked like this. Additions are marked like this.
Line 3: Line 3:
Both the bundle database persistence manager and the database data store support JNDI data sources. Here is how you can configure those two using data sources: Jackrabbit supports JNDI data sources. The bundle database persistence manager, the database data store, and the file system (including its subclasses) support a JNDI data source in place of the JDBC driver and database URL. Here is how you can configure those two using data sources:

{{{
<FileSystem class="org.apache.jackrabbit.core.fs.db.DbFileSystem">
  <param name="driver" value="javax.naming.InitialContext"/>
  <param name="url" value="java:comp/env/jdbc/DataStore"/>
</FileSystem>
}}}
Line 12: Line 19:

How to use a JNDI DataSource

Jackrabbit supports JNDI data sources. The bundle database persistence manager, the database data store, and the file system (including its subclasses) support a JNDI data source in place of the JDBC driver and database URL. Here is how you can configure those two using data sources:

<FileSystem class="org.apache.jackrabbit.core.fs.db.DbFileSystem">
  <param name="driver" value="javax.naming.InitialContext"/>
  <param name="url" value="java:comp/env/jdbc/DataStore"/>
</FileSystem>

<DataStore class="org.apache.jackrabbit.core.data.db.DbDataStore">
  <param name="driver" value="javax.naming.InitialContext"/>
  <param name="url" value="java:comp/env/jdbc/DataStore"/>
  <param name="databaseType" value="postgresql"/>
</DataStore>

<PersistenceManager class="org.apache.jackrabbit.core.persistence.bundle.PostgreSQLPersistenceManager">
  <param name="driver" value="javax.naming.InitialContext"/>
  <param name="url" value="java:comp/env/jdbc/Workspaces"/>
  <param name="schemaObjectPrefix" value="${wsp.name}_"/>
  <param name="schema" value="postgresql"/>
</PersistenceManager>

Please note that 'schema' in the persistence manager has the meaning of 'database type'.

UsingJNDIDataSource (last edited 2009-10-13 09:03:47 by ThomasMueller)