cancel
Showing results for 
Search instead for 
Did you mean: 

Connection to Repository

cobolus
Champ in-the-making
Champ in-the-making
Hi !

I have alfresco 4.0 installed and want to add an extention to it (a service that stores files to alfresco using apache camel routes). The problem is that the following line in my code fails:
ApplicationContext ctx = new ClassPathXmlApplicationContext("classpath:alfresco/application-context.xml");

It doesn't find the alfresco/application-context.xml but I could find it under /webapps/alfresco/WEB-INF/classes/alfresco/application-context.xml . Do I need to include this also in my web.xml for my war file or what is the correct way to setup that connection between the alfresco.war and myservice.war ?

thanks for you help

cobolus
6 REPLIES 6

mrogers
Star Contributor
Star Contributor
Either you need to embed alfresco into your web app or you need to call one of the remote interfaces

cobolus
Champ in-the-making
Champ in-the-making
how can I embed alfresco into my web app  ? my application is also based on Spring so how can I access now the beans without embedding the already deployed alfresco.war ?

mrogers
Star Contributor
Star Contributor
You don't access the alfresco.war.    You take all the alfresco code and add it to myservice.war

You add the alfresco context to your context.

cobolus
Champ in-the-making
Champ in-the-making
is there a maven build to get this done ?

cobolus
Champ in-the-making
Champ in-the-making
additionally is there documentation which files need to get changed to integrate both (apache camel and alfresco) ?

would it be also possible to use amp for that ?

pramodkhare
Champ in-the-making
Champ in-the-making
Hi, I also have the same doubt,

I tried to embed Alfresco into my web application war, I did this,

in my web.xml, I have put —>

<context-param>
      <param-name>contextConfigLocation</param-name>
      <param-value>/WEB-INF/web-application-context.xml</param-value>
   </context-param>
 
   <listener>
     <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
  </listener>

And in my WEB-INF, this is my directory structure –>

WEB-INF
   |
   |—- classes
   |         |—-alfresco
   |         |          |—- (all config xml files (the same config folder from Alfresco Embedded Sample Project))
   |         |—-alfresco-global.properties
   |         |—- log4j.properties
   |—- lib
            |— all dependency jars (same jars from from Alfresco Embedded Sample Project's dependencies folder))


But still I am not able to start my server it gives me  a lot different errors,
So I want to know, if I am doing right or is there anything missing or wrong here….. Please need help with this.