You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by Dietmar Gräbner <d....@berlinger.cc> on 2006/09/14 17:55:47 UTC
OracleFileSystem, OraclePersistenceManager and the schema
Hi
I had problems using Jackrabbit in more than one schema on the same
oracle instance.
Jackrabbit assumes that the table name (f.e.: prefix + fs_entry) is
unique across all schemas used on one oracle instance. So two
Jackrabbit instances using two schemas on the same Oracle instance won't
work.
A solution for the problem is to overwrite the checkSchema methods in
OracleFileSystem and OraclePersistenceManager and consider the schema name.
Here are the first few lines from OraclePersistenceManager.checkSchema():
protected void checkSchema() throws Exception {
DatabaseMetaData metaData = con.getMetaData();
String tableName = schemaObjectPrefix + "NODE";
*String userName = metaData.getUserName();
if (metaData.storesLowerCaseIdentifiers()) {
tableName = tableName.toLowerCase();
} else if (metaData.storesUpperCaseIdentifiers()) {
tableName = tableName.toUpperCase();
}
*ResultSet rs = metaData.getTables(null, userName, tableName, null);
....
}
* mark the changes - the remainder of the method is from
DBPersistenceManager
best regards
Dietmar
Re: OracleFileSystem, OraclePersistenceManager and the schema
Posted by Stefan Guggisberg <st...@gmail.com>.
hi dietmar,
good point. please post a jira issue and attach a patch.
thanks
stefan
On 9/14/06, Dietmar Gräbner <d....@berlinger.cc> wrote:
> Hi
>
> I had problems using Jackrabbit in more than one schema on the same
> oracle instance.
>
> Jackrabbit assumes that the table name (f.e.: prefix + fs_entry) is
> unique across all schemas used on one oracle instance. So two
> Jackrabbit instances using two schemas on the same Oracle instance won't
> work.
>
> A solution for the problem is to overwrite the checkSchema methods in
> OracleFileSystem and OraclePersistenceManager and consider the schema name.
>
> Here are the first few lines from OraclePersistenceManager.checkSchema():
>
> protected void checkSchema() throws Exception {
> DatabaseMetaData metaData = con.getMetaData();
> String tableName = schemaObjectPrefix + "NODE";
> *String userName = metaData.getUserName();
>
> if (metaData.storesLowerCaseIdentifiers()) {
> tableName = tableName.toLowerCase();
> } else if (metaData.storesUpperCaseIdentifiers()) {
> tableName = tableName.toUpperCase();
> }
> *ResultSet rs = metaData.getTables(null, userName, tableName, null);
> ....
> }
>
> * mark the changes - the remainder of the method is from
> DBPersistenceManager
>
>
> best regards
>
> Dietmar
>
>
>
>