java.util.prefs.Preferences Sharing between two JVMs -


i have 2 java programs (a, b) run in separate (local) jvms, access same java.util.prefs.preferences (java.util.prefs.windowspreferences)

prefs = preferences.systemnodeforpackage(foo.class) 

both programs call once @ startup.

a gui program allows configuration. changes written preferences node. @ end flush called.

b background program doing actual work.

a sends notification b configuration has changed. b reads changed configuration.

there no concurrent access preferences, since cross-jvm locking (using java.nio.channels.filelock) used.

my question: safe solution? b read a has written?


Comments

Popular posts from this blog

tcpdump - How to check if server received packet (acknowledged) -