[MAGNOLIA-899] move away implementation classes definition from magnolia.properties Created: 26/May/06  Updated: 20/Feb/15  Resolved: 28/May/06

Status: Closed
Project: Magnolia
Component/s: core
Affects Version/s: 3.0 Beta 1
Fix Version/s: 3.0 RC1

Type: Task Priority: Major
Reporter: Fabrizio Giustina Assignee: Fabrizio Giustina
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Template:
Acceptance criteria:
Empty
Task DoR:
Empty
Date of First Response:

 Description   

magnolia.properties in WEB-INF/config/* was meant to host configuration that need to be modified by users and that can change on different environment (e.g. repository configuration, logging).

Definition of magnolia internal components should be moved away from here, because it's not intended to be modified by end users (well, not usually), and because having it here forces users to change the file at every upgrade (I had my instance broken several times while using 3.0 snapshot due to changes in implementation classes because that file needed to be updated)



 Comments   
Comment by Philipp Bracher [ 26/May/06 ]

Any suggestions about where to store them?

Comment by Fabrizio Giustina [ 26/May/06 ]

well, these properties should definitively be stored in magnolia jars... by using Spring these beans would probably be defined in a set of xml files, each stored in the appropriate module, and loaded from the classpath.
At the moment I think that the easiest solution is to move them to a property file in magnolia-core and to load it from the classpath (merging its content with System Properties): it's not a great solution since there are implementation classes that doesn't belong to core but I think that it's pretty useless at this point to spend time in splitting them to different properties files and to implement a way to load them from each module (that comes for free with Spring).
If we add the properties file to the classpath anybody is still free to define its own implementation by adding a different file to WEB-INF/classes, since the classloader give priority to files in the webapp folder.

Comment by Philipp Bracher [ 26/May/06 ]

Sounds reasonable

Comment by Fabrizio Giustina [ 28/May/06 ]

done, there is now a mgnl-beans.properties in magnolia-core/src/main/resources. It's loaded before user configuration, so you can still define your own implementation classes in magnolia.properties.

Generated at Mon Feb 12 03:21:42 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.