This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JForum and the fly likes SystemGlobals.properties, some properties deleted after JBoss restart Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » JForum
Bookmark "SystemGlobals.properties, some properties deleted after JBoss restart" Watch "SystemGlobals.properties, some properties deleted after JBoss restart" New topic
Author

SystemGlobals.properties, some properties deleted after JBoss restart

Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
remove the war file after it has been deployed or start the jbos with the expanded war file...

When you restart the app server he will 'install' the war again, thus start up with the default values again ...
[originally posted on jforum.net by Sid]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Hi all,

got a strage thing today. Changed some properties in the SystemGlobals.properties file, that were "forum.page.title" and forum.page.metatag.keywords". It worked OK for a while and then, after JBoss was restarted, my values disappeared and I saw the default values again. Could anyone tell me how I can awoid it?

Thanks in advance
[originally posted on jforum.net by August]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
hm... sorry, I don't understand what do you mean.
This happened on the test server, where jforum is deployed "exploded" - not as a war file, but in a folder. So, what should I delete there?
[originally posted on jforum.net by August]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Thank you for your help, Sid. The solution of the problem lied somewhere else and has allmost nothing to do with JForum: all specific configuration files of this server are in some specified folder (the config files for the forum too) and after each JBoss restart they are copied to the standard folder. I didn't know that. Sorry.
[originally posted on jforum.net by August]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Sorry, I push this thread up.

Any idea how to avoid this effect? This happens realy after each restart of JBoss.

Thanks in advance
[originally posted on jforum.net by August]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Can you verify that there's no jforum war file?

Even if the structure already is exploded (it will automatically explode the war at the first start, ever since then you'll see the exploded structure) - it will try to reinstall the application at restart of the webserver, if there was a war file found.

At present that's pretty much the only idea that I have for why it would reset the properties, as only in the installation war file there's the "original" file that has not been modified by the customer.

Though I have to admit, I primarly work with Tomcat. Not sure if JBoss administration has some other tweaks on how to install applications, and where it would hold the war file of installed files.

When using websphere server e.g. it would also primarly allow installaiton of ear or war files. So - the updated properties already should be packaged into the war to ensure that the customizations will be available to the server no matter how often you reboot the system.
[originally posted on jforum.net by Sid]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Sid, thank you for the answer.

I have just checked the deployment directory. All JForum files are in the folder named JForum.war and there is no other file with this name.

Any idea where else these default values could come from?

Well, I guess, I should add, that the original war-file has never been on that server, JForum came there after some modules had been changed (customized SSO for example).
[originally posted on jforum.net by August]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
I think there we have it ;)

jforum.war means that it originally was a war file and probably in the background it still will redeploy the initially installed war file. I guess you used the war to install the app, and then customized the settings on the frontend...

Some settings then are stored in the jforum_custom.properties or something alike that. This file most probably was not included in the original war that you installed on the jboss server.

The next step would be to "package" the application again in a war file - including the updated (correct) properties files that are required to run the app. Then make an update installation on jboss (or remove the old one and install fresh) ...

I think this way you should be able to start along with the available properties.

Keep in mind that you aren't really able to make persistent changes this way, as those changes are only kept in the properties file that are replaced after reboot again.

I think one way would be to maybe rewrite some parts of the jforum code so that it would allow you to specify a folder where to store the custom config files to - so that these are persistent even after reboot/reinstall ...

Not sure if there's a better solution, but that's one that comes to my mind.
[originally posted on jforum.net by Sid]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: SystemGlobals.properties, some properties deleted after JBoss restart
 
Similar Threads
Moderation turned off for all forums but still moderating
HI Rafael, a question about Moderated Forums
How to add new forums directly?
Change date and time format
Smilies not on localhost