jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jukka Zitting <ju...@zitting.name>
Subject Re: JackRabbit as Shared J2EE Resource
Date Fri, 10 Jun 2005 11:59:37 GMT
Hi,

Florian Ried wrote:
>    <!-- Global Repository -->
>    <Resource name="jcr/globalRepository"
>          auth="Container"
>          type="javax.jcr.Repository"
>          
> factory="org.apache.jackrabbit.core.jndi.BindableRepositoryFactory"
>          configFilePath="D:\repotest/repository.xml"
>          repHomeDir="D:\repotest"/>

I checked through the BindableRepositoryFactory source code [1] and 
noticed that it doesn't instantiate the repository unless the resource 
type is set to "org.apache.jackrabbit.core.jndi.BindableRepository" (see 
line 60). Thus the instructions on the web are incorrect in proposing to 
use "javax.jcr.Repository".

Try changing your global configuration to:

     <Resource name="jcr/globalRepository"
           auth="Container"
           type="org.apache.jackrabbit.core.jndi.BindableRepository"
 
factory="org.apache.jackrabbit.core.jndi.BindableRepositoryFactory"
           configFilePath="D:\repotest/repository.xml"
           repHomeDir="D:\repotest"/>

Is there a good reason for requiring the exact class instead of the more 
generic interface in the JNDI configuration? I'll submit a bug report to 
track this issue.

[1] 
http://incubator.apache.org/jackrabbit/xref/org/apache/jackrabbit/core/jndi/BindableRepositoryFactory.html#51

BR,

Jukka Zitting

Mime
View raw message