cancel
Showing results for 
Search instead for 
Did you mean: 

URGENT : context files order in web.xml

alpha
Champ in-the-making
Champ in-the-making
Hi guys,

I have a question that is very important to me. I have noticed in web.xml this code :
<context-param>
      <param-name>contextConfigLocation</param-name>
      <param-value>
         classpath:alfresco/application-context.xml
         classpath:alfresco/web-client-application-context.xml
         classpath:alfresco/web-scripts-application-context.xml
         classpath:web-services-application-context.xml
      </param-value>
      <description>Spring config file locations</description>
   </context-param>

The file application-context.xml is loaded before the other spring config file. This means that beans defined in web-client-application-context.xml, web-scripts-application-context.xml and web-services-application-context.xml cannot be overrided in extension/*-context.xml files. I've already run some tests because i needed to override bean
<bean id="webClientConfigSource">…</bean>
.

Is this done on purpose? If Yes, please tell me why.

I have also noticed in alfresco 1.4, the file application-context.xml was loaded after the other spring config files, allowing therefore to override all previous beans.

thanks
4 REPLIES 4

alpha
Champ in-the-making
Champ in-the-making
no answer or the question isn't clear?  Smiley Sad

mindthegab
Champ in-the-making
Champ in-the-making
I'm having the same problem while trying to override the location of the web-client-config-custom as described here

http://wiki.alfresco.com/wiki/Web_Client_Configuration_Guide#Multiple_Config_Files


I'm editing the page as at the moment it just CAN'T work like this.

Did you try to invert loading order BTW? Crashes with unresolved bean references?

fogo
Champ in-the-making
Champ in-the-making
I'm suffering with this too, trying to override

<bean id="webClientConfigSource">…</bean>

Can it be done?

fogo
Champ in-the-making
Champ in-the-making
There is a work around in this thread http://forums.alfresco.com/viewtopic.php?t=8274

You can't override webClientConfigSource, but you can define your own config files in your amps module-context.xml