You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by Torgeir Veimo <to...@pobox.com> on 2008/10/01 14:55:11 UTC
using sling w jackrabbit client
I'm trying to use sling with a different repository than the default
one, which is proving a bit of a challenge. Since we distribute the
repository.xml file within the webapp itself, we cannot configure the
repository using standard model 2 configuration with jndi Resource and
ResourceParam, since it only allows repository.xml to be read from disk.
If I try to set up and register a repository in jndi I get an exception
javax.naming.NamingException: Context is read only
The normal RegistryHelper.registerRepository() method in jackrabbit
gives the same result. It appears that adding stuff to the jndi
configuration runtime is not allowed per J2EE spec.
Does anyone know any workaround for this? It seems that using Sling
with a non-standard repository is only available over RMI unless the
repository is configured with a repository.xml file living in the file
system.
--
Torgeir Veimo
torgeir@pobox.com
Re: using sling w jackrabbit client
Posted by Felix Meschberger <fm...@gmail.com>.
Hi Torgeir,
Torgeir Veimo schrieb:
>> Or are you trying to create a repository instance which you want to
>> register in a JNDI context ?
>
>
> Yes. I already got it working. I was initially confused wrt java: prefix
> and the read-only context as defined in the j2ee specs.
>
> It's only an interim solution until more of our application itself is
> OSGi based.
>
Ok, good to hear. (and sorry for the delay ;-) )
Regards
Felix
Re: using sling w jackrabbit client
Posted by Torgeir Veimo <to...@pobox.com>.
On 22 Oct 2008, at 10:01, Felix Meschberger wrote:
>
> I do not exactly understand, where you are heading ;-)
>
> Are you trying to access an existing repository instance registered
> in a
> JNDI context ?
No.
> Or are you trying to create a repository instance which you want to
> register in a JNDI context ?
Yes. I already got it working. I was initially confused wrt java:
prefix and the read-only context as defined in the j2ee specs.
It's only an interim solution until more of our application itself is
OSGi based.
--
Torgeir Veimo
torgeir@pobox.com
Re: using sling w jackrabbit client
Posted by Felix Meschberger <fm...@gmail.com>.
Hi Torgei,
I do not exactly understand, where you are heading ;-)
Are you trying to access an existing repository instance registered in a
JNDI context ?
Or are you trying to create a repository instance which you want to
register in a JNDI context ?
Regards
Felix
Torgeir Veimo schrieb:
> I'm trying to use sling with a different repository than the default
> one, which is proving a bit of a challenge. Since we distribute the
> repository.xml file within the webapp itself, we cannot configure the
> repository using standard model 2 configuration with jndi Resource and
> ResourceParam, since it only allows repository.xml to be read from disk.
>
> If I try to set up and register a repository in jndi I get an exception
>
> javax.naming.NamingException: Context is read only
>
> The normal RegistryHelper.registerRepository() method in jackrabbit
> gives the same result. It appears that adding stuff to the jndi
> configuration runtime is not allowed per J2EE spec.
>
> Does anyone know any workaround for this? It seems that using Sling with
> a non-standard repository is only available over RMI unless the
> repository is configured with a repository.xml file living in the file
> system.
>