Jackrabbit On Tomcat
- This applies to Tomcat 5.5 and Oracle 10g
- Other versions should work with the same configuration as well.
- Make sure you have ojdbc14.jar in common/lib
- On the ExamplesPage a patch is included that can be run in Eclipse and against jackrabbit-core-1.1.1 to create the JNDI Oracle support in Jackrabbit.
server.xml
<Resource name="jdbc/jcr" auth="Container" type="oracle.jdbc.pool.OracleDataSource" user="jackrabbit" password="" driverClassName="oracle.jdbc.OracleDriver" url="jdbc:oracle:thin:@localhost:1521:XE" factory="oracle.jdbc.pool.OracleDataSourceFactory" maxActive="20" maxIdle="10" maxWait="-1" />
- An OracleDatasource and OracleDataSourceFactory must be configured so JNDI returns the appropriate datasource for the Oracle extensions
- Please take note: use
user
and not the defaultusername
in the resources section in server.xml - the repository.xml must be configured as follows:
<FileSystem class="org.apache.jackrabbit.core.fs.db.JNDIOracleDatabaseFileSystem"> <param name="path" value="${rep.home}"/> <param name="dataSourceLocation" value="jdbc/jcr"/> <param name="checkValidConnectionSQL" value="select 0 from dual" /> <param name="schemaObjectPrefix" value="default"/> <param name="schema" value="oracle" /> </FileSystem> <PersistenceManager class="org.apache.jackrabbit.core.state.db.JNDIOracleDatabasePersistenceManager"> <param name="path" value="${wsp.home}/db"/> <param name="dataSourceLocation" value="jdbc/jcr"/> <param name="checkValidConnectionSQL" value="select 0 from dual" /> <param name="schemaObjectPrefix" value="pm_def"/> <param name="schema" value="oracle" /> <param name="externalBLOBs" value="false"/> </PersistenceManager>
- What about other FileSystem and PersistenceManager other than Oracle? See JackrabbitOnTomcat6
- What about using the Tomcat UserDatabase for user authentication and roles?