AnsweredAssumed Answered

jcr from other webapp in same tomcat

Question asked by dirko on Mar 11, 2008
Latest reply on Mar 19, 2008 by jharrop
Hello,

I would like to use the jcr interface in my own webapp to access the alfresco repository. Both webapps run in the same tomcat. I already got stuck on the first relevant line (code copied from sdk FirstJCRClient):

ApplicationContext context = new ClassPathXmlApplicationContext("classpath:alfresco/application-context.xml");

=> FileNotFoundException

I could postpone the issue by using the FileSystemXmlApplicationContext("file:/…/application-context.xml"), but then the FileNotFoundException returned on the next file (alfresco/cache-context.xml) that was specified in terms of the classpath.

I looked through the archives and i am aware of the wiki page http://wiki.alfresco.com/wiki/Alfresco_and_Tapestry_on_the_Same_Tomcat_Installation, but I'm not completely satisfied/confident about the answers i found there. The relevant threads were often pre-1.3 and the wiki page is focused on Tapestry as second webapp.

So I would like to know what the current best practice is to access the repository via jcr from another standard webapp?

Cheers,
dirk

Outcomes