We have a java application that uses Java Preferences to access application properties/configuration. Some of the application properties can be modified during application runtime and hence the application re-reads the preferences file(prefs.xml) at regular intervals. All was well till recently- the application reads the prefs.xml correctly on start-up but if the property value changes during application runtime(i.e. the prefs.xml is updated), it does not seem to get the latest value of that property. This seems to happen for 1 userid only and on certain servers. It works if the application is run with a different userid on the same servers.
Has anyone encountered similar issues and know of the potential cause ? Both the users have the same setup - no issue with permissions etc.
Appreciate your input.
Thanks for responding.
Yes, if the application is restarted, it reads the changes made to prefs.xml. Basically it appears the app reads the prefs.xml on startup correclty. Once the application is running, it uses the original value even though the value is changed in prefs.xml.
I do invoke the preferences.sync() before accessing the value.
This issue happens in our production environments for the application user id only. The SA could not indicate if there were any patches etc installed that might be causing this issue .. if i could get some guidance on the possible cause of this issue, it will be helpful.
Thanks a lot!