A
Andrew May
I'm using the Preferences API with the 1.4.2 JDK on Solaris and my
application doesn't seem to be picking up changes to the preferences
from outside the VM.
I'm using the Preferences to configure the Logging API that I'm using
for an application running on JBoss - so it's a long running process
and I want to be able to change the configuration on the fly.
Rather than spending time writing a complex MBean to edit the
Preferences within the same VM, I've been editing the system
preferences by hand and then have a MBean that calls
LogManager.readConfiguration() which in turn calls my configuration
class that uses the preferences.
I've tried waiting for the preferences to sync automatically (i.e. >
30 seconds), and I've also tried putting calls to prefs.sync() before
retrieving any values, but neither seem to work.
Running a standalone test case that uses the same logging
configuration the changes to my configuration are picked up.
The thing that really confuses me is that I'm sure I've had things
being updated on the fly like this before.
Have I misunderstood how the preferences work? Or is it broken in my
case?
Thanks,
Andrew
application doesn't seem to be picking up changes to the preferences
from outside the VM.
I'm using the Preferences to configure the Logging API that I'm using
for an application running on JBoss - so it's a long running process
and I want to be able to change the configuration on the fly.
Rather than spending time writing a complex MBean to edit the
Preferences within the same VM, I've been editing the system
preferences by hand and then have a MBean that calls
LogManager.readConfiguration() which in turn calls my configuration
class that uses the preferences.
I've tried waiting for the preferences to sync automatically (i.e. >
30 seconds), and I've also tried putting calls to prefs.sync() before
retrieving any values, but neither seem to work.
Running a standalone test case that uses the same logging
configuration the changes to my configuration are picked up.
The thing that really confuses me is that I'm sure I've had things
being updated on the fly like this before.
Have I misunderstood how the preferences work? Or is it broken in my
case?
Thanks,
Andrew