You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by Sa...@bosch-si.com on 2012/07/10 17:18:53 UTC

How to set the DB schema name for Jackrabbit

Hi all,

we are using Jackrabbit 2.2.10. How do I set the DB schema name that Jackrabbit should use in the BundlePersistenceManagers, DBFileSystems, DbDataStores etc...?

I tried to use the property "schemaObjectPrefix" in my repository.xml file but that doesn`t work. I set the value to something like "SCHEMA.PREFIX_" but Jackrabbit internally replaces the "." char with another one because it thought that it is an invalid table name. DbDataStore doesn`t do this, it just doesn`t call the ConnectionHelper.prepareDbIdentifier method. Maybe someone has forgotten that.

The second problem is (after fixing the ConnectionHelper.prepareDbIdentifier method) that the ConnectionHelper.tableExists check doesn`t work for some reason and Jackrabbit always tries to create the database tables if the "schemaCheckEnabled" property is set to "true". So for me it looks like Jackrabbit is unable to deal with database schema names or do I understand something completely wrong?

Regards,

Sascha

Re: AW: How to set the DB schema name for Jackrabbit

Posted by Stephen Byrne <st...@lincware.com>.
On 07/10/2012 12:27 PM, Sascha.Theves@bosch-si.com wrote:
> Thanks Stephen, I can really not imagine that nobody has used a db schema name in Jackrabbit before. I will give your patch a try... But anyway, can somebody from the Jackrabbit committers clearify the behavior here or comment the status of JCR-1180?

My solution (using Postgres) was to have JackRabbit get the DataSource 
from JNDI, and define the JNDI Resource with initConnectionSqls="set 
search_path to 'myJcrSchema';". There may be similar mechanisms with 
other RDMSes.

-- 
Stephen Byrne
stephen@lincware.com

AW: How to set the DB schema name for Jackrabbit

Posted by Sa...@bosch-si.com.
Thanks Stephen, I can really not imagine that nobody has used a db schema name in Jackrabbit before. I will give your patch a try... But anyway, can somebody from the Jackrabbit committers clearify the behavior here or comment the status of JCR-1180?


-----Ursprüngliche Nachricht-----
Von: Stephen Byrne [mailto:stephen@lincware.com] 
Gesendet: Dienstag, 10. Juli 2012 18:07
An: users@jackrabbit.apache.org
Betreff: Re: How to set the DB schema name for Jackrabbit

On 07/10/2012 11:18 AM, Sascha.Theves@bosch-si.com wrote:
> Hi all,
>
> we are using Jackrabbit 2.2.10. How do I set the DB schema name that Jackrabbit should use in the BundlePersistenceManagers, DBFileSystems, DbDataStores etc...?
>
> I tried to use the property "schemaObjectPrefix" in my repository.xml file but that doesn`t work. I set the value to something like "SCHEMA.PREFIX_" but Jackrabbit internally replaces the "." char with another one because it thought that it is an invalid table name. DbDataStore doesn`t do this, it just doesn`t call the ConnectionHelper.prepareDbIdentifier method. Maybe someone has forgotten that.
>
> The second problem is (after fixing the ConnectionHelper.prepareDbIdentifier method) that the ConnectionHelper.tableExists check doesn`t work for some reason and Jackrabbit always tries to create the database tables if the "schemaCheckEnabled" property is set to "true". So for me it looks like Jackrabbit is unable to deal with database schema names or do I understand something completely wrong?
>
> Regards,
>
> Sascha
>

https://issues.apache.org/jira/browse/JCR-1180

I submitted a patch for this against 2.2.7, but it never got anywhere.

-- 
Stephen Byrne
stephen@lincware.com

Re: How to set the DB schema name for Jackrabbit

Posted by Stephen Byrne <st...@lincware.com>.
On 07/10/2012 11:18 AM, Sascha.Theves@bosch-si.com wrote:
> Hi all,
>
> we are using Jackrabbit 2.2.10. How do I set the DB schema name that Jackrabbit should use in the BundlePersistenceManagers, DBFileSystems, DbDataStores etc...?
>
> I tried to use the property "schemaObjectPrefix" in my repository.xml file but that doesn`t work. I set the value to something like "SCHEMA.PREFIX_" but Jackrabbit internally replaces the "." char with another one because it thought that it is an invalid table name. DbDataStore doesn`t do this, it just doesn`t call the ConnectionHelper.prepareDbIdentifier method. Maybe someone has forgotten that.
>
> The second problem is (after fixing the ConnectionHelper.prepareDbIdentifier method) that the ConnectionHelper.tableExists check doesn`t work for some reason and Jackrabbit always tries to create the database tables if the "schemaCheckEnabled" property is set to "true". So for me it looks like Jackrabbit is unable to deal with database schema names or do I understand something completely wrong?
>
> Regards,
>
> Sascha
>

https://issues.apache.org/jira/browse/JCR-1180

I submitted a patch for this against 2.2.7, but it never got anywhere.

-- 
Stephen Byrne
stephen@lincware.com