Pieter wrote:(apart from some comments in a language I cannot read :lol:)
Pieter wrote:Just a quick question: If I read the code correctly, in non-development mode changed configuration options are only activated after you restart the jforum web application. Do you want to keep this behaviour, or do you want to effectuate changes immediately?
Pieter wrote:Done. My login on jira is "pieter".
Pieter wrote:
But we don't need to reload the config files when the change took place from within the JForum admin section: we have all the information to just update the current configuration in memory (and of course also on disk) when the admin user hits the "update" button!
Pieter wrote:
As I read the code now, changes to these values are only written to disk, not used directly. So when the admin changes these settings via the "Config" section, the webapp still needs reloading for the changes to be activated.
Pieter wrote:An interesting approach, I don't know that book but I'm always interested to learn so can you give me the rationale behind this?
Pieter wrote:
If you choose to use an abstract class instead of an interface you cannot implement the interface to use the constants unqualified.
Pieter wrote:A complete pass over all configuration properties is always a nice moment to do some garbage collection. I found two dubious properties:
"useFilesystemCache" is not used anywhere
"avatarMaxKbSize" is only used in ./templates/admin/config_list.htm but never used anywhere so this limit is probably not enforced yet.
You can decide whether these are real problems (and therefore warrant an issue in JIRA) or not
Pieter wrote:
But introducing yet another user dependent file does not make it easier to configure
JForum for a new user.
If we place "driver.name" and "database.connection.string" in the main configuration
our troubles are over: all the other properties are unlikely to be different between
installations.
Pieter wrote:
On second thought it might be an idea to also move the other 4 properties in
mysql.properties to the main configuration because 3 of them are not mysql
specific as far as I can tell.
[...]
This way, when a new user wants to install JForum, the only editing he/she needs
to do is to create a file conf/<user>.properties and put in about three properties:
- forum.link (as it is unlikely that JForum should run on the localhost),
- database.driver.name (only if not using mysql)
- database.mysql.connection.string
As this is all configuration stuff that is needed to get JForum up and running,
and all other stuff can be edited online by the admin!
Pieter wrote:
I have actually added experimental ${key} replacement in the configuration options,
so we could even simplify things further by adding:
database.mysql.connection.string=jdbc:mysql://${database.mysql.connection.host}:${database.mysql.connection.port}/jforum?user=${database.mysql.connection.username}&password=${database.mysql.connection.password}&autoReconnect=true
database.mysql.connection.host=localhost
database.mysql.connection.port=3306
database.mysql.connection.username=<username>
database.mysql.connection.password=<password>
Rafael Steil wrote:I updated your changes from CVS.. am taking a closer look, but seems nice.
There is only two points I ask you:
1) Please use tabs instead spaces for indenting ( 4 length is ok ). I don't care if you use Sun code style or Jakarta style, but, *please*, use tabs
2) Put the copyright on every new file ( you can copy it from any other java source ). Ah, and add
as well, so we can know exactly which class' version are we using.
Pieter wrote:It might be a good idea to export your formatting settings and commit the resulting xml file into the jforum CVS repository. Developers can then just import these settings and be sure they have the same formatting styles you prefer!
Pieter wrote:
You can do the same for the Code Templates: if you add the copyright and @version $Id: $ stuff, we will get them automatically for each new file!
Pieter wrote:Closing JF-13 (per user config) maybe was a little premature as the database stuff is still not done. Shall I reopen this issue and work on this some more?
Don't get me started about those stupid light bulbs. |