Hello,
I'm trying to access a Magnolia repository (using Derby DB) from another webapp,
both webapps are running under the same Tomcat 5.0.28 instance.
I've set up a "model 2" deployment model, as described on
http://jackrabbit.apache.org/doc/deploy/howto-model2.html
According to \WEB-INF\config\default\repositories.xml file, the JNDI name should
be the webapp name (<param name="bindName" value="${magnolia.webapp}" />).
But when trying to connect to the Magnolia repository from the other webapp
(JNDI lookup with webapp name), it always throws a "NameNotFoundException".
Does Magnolia globaly expose its JCR connection so that it can be accessed
through the JNDI global pool by another webapp ?
If not, how to achieve this ?
Am I trying to achieve something impossible ? Any hints ?
Thank you for your help,
Oliver
------------------------------------------
Current settings applied to my Magnolia 3.1m3 instance:
- created a Magnolia webapp context file
(/Tomcat/conf/Catalina/localhost/magnoliaAuthor.xml):
<ResourceLink name="magnoliaAuthor" global="jcr/magnoliaAuthorGlobal"
type="javax.jcr.Repository"/>
- added into the /tomcat/conf/server.xml section <GlobalNamingResources>:
<Resource name="jcr/magnoliaAuthorGlobal" auth="Container"
type="javax.jcr.Repository"/>
<ResourceParams name="jcr/magnoliaAuthorGlobal">
<parameter><name>factory</name><value>org.apache.jackrabbit.core.jndi.BindableRepositoryFactory</value></parameter>
<parameter><name>configFilePath</name><value>/test/repositories/magnolia/repository/repository.xml</value></parameter>
<parameter><name>repHomeDir</name><value>/test/repositories/magnolia/repository</value></parameter>
</ResourceParams>
- added into the Test webapp web.xml file:
<resource-env-ref>
<description>Content Repository</description>
<resource-env-ref-name>jcr/magnoliaAuthorGlobal</resource-env-ref-name>
<resource-env-ref-type>javax.jcr.Repository</resource-env-ref-type>
</resource-env-ref>
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
----------------------------------------------------------------
for list details see
http://documentation.magnolia.info/docs/en/editor/stayupdated.html
----------------------------------------------------------------