Hi,

I didn't look, but unless magnolia has very special handling for this, Java 
loads classpath resources on a first-come basis, i.e. if a class or resource is 
present twice in the classpath, it will simply be loaded from the first 
location found. Which is the first location is not clearly defined (can be OS 
dependant, I think), but in practical purposes JAR files are loaded in 
alphabetical order.

Does magnolia use the classloading mechanism, or does it scan JARs itself?

Regards from Vienna,

Richard

> -----Ursprüngliche Nachricht-----
> Von: [email protected] [mailto:user-list-owner@magnolia-
> cms.com] Im Auftrag von Héctor Prieto (via Magnolia Forums)
> Gesendet: Donnerstag, 17. September 2015 12:37
> An: Magnolia User List
> Betreff: [magnolia-user] Classpath resources load order
> 
> Although in the [url=null]resources documentation[/url] it is very well
> explained the resources loading order attending to the resources location
> (JCR > filesystem > classpath), in my company we have sometimes trouble
> overriding already existing templates from other modules, as we can't seem
> to understand the resource loading order between different modules.
> 
> We first assumed the latest module loaded would override existing
> resources, so that by adding in my module A a dependency to module B in
> the module descriptor, A would be loaded after B and would be able to
> override resources, but that is not the case.
> 
> For instance, we tried to load a template with the same path and name from
> 3 different modules and the one that got loaded from was the 2nd module
> loaded, neither the first nor the last, so we are completely clueless.
> 
> Could anyone shed some light on this?
> Thank you in advance
> 
> --
> Context is everything: http://forum.magnolia-
> cms.com/forum/thread.html?threadId=9a13f911-499f-446e-a256-
> 5b7d55d128f4
> 
> 
> ----------------------------------------------------------------
> For list details, see http://www.magnolia-cms.com/community/mailing-
> lists.html
> Alternatively, use our forums: http://forum.magnolia-cms.com/
> To unsubscribe, E-mail to: <[email protected]>
> ----------------------------------------------------------------



----------------------------------------------------------------
For list details, see http://www.magnolia-cms.com/community/mailing-lists.html
Alternatively, use our forums: http://forum.magnolia-cms.com/
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------

Reply via email to