cancel
Showing results for 
Search instead for 
Did you mean: 

AMP modules starting oder

vycitalr
Champ in-the-making
Champ in-the-making
Hallo,

I have a question regarding AMP modules. When I have a war with several modules installed, what is the start order of the modules? Is it deterministic, based on what,can be changed or controlled? In other words, I would like to have a sort of "template" module, that contains some basic functionality for all my projects. However, I want to have the possibility to redefine stuff from this template module (eg. some beans) in other modules. So I need to have control over what implementation is used. How to achieve this?

Another related thing is how to handle modules where there are duplicate files. Again I want to have eg. a JSP in template module, but in other module a have different version, which I want to be in effect. I think this could be managed by controlling the order in which the mmt-tool injects the modules. Can I control this and ensure some file is overwritten if already present?

Thank you for any comments.

Robert
3 REPLIES 3

dhalupa
Champ on-the-rise
Champ on-the-rise
http://wiki.alfresco.com/wiki/Developing_an_Alfresco_Module

Take a look at module.depends property which can be used to specify module loading order

Kind regards,

Denis

vycitalr
Champ in-the-making
Champ in-the-making
The module dependency is not sufficient for my purpose. I have this case - one module's data model references data model of the other module. So I need the referenced module be loaded first, so that is known when the other module's data model is loaded. However, I cannot manage this with the 'module.depends' setting. This is spring-stuff and I get bean-releated exeptions complaining about non-existing prefix. This error occures even before I get any of the "Starting module…." messages, so I think it cannot be reached with the dependency. Any idea how to solve this?

vycitalr
Champ in-the-making
Champ in-the-making
I solved this by common spring feature "depends-on" for a bean.