Hi If i synchronize a code will it work in the cluster servers. I have two cluster server. Here i have the generating a unique file name. I check in a directory, and if the file name is present i generate a unique fine name by appending the time stamp. So this code has to be synchronized. Now my both the servers are mapped to a sinple directory. Will my synchronized code run??. as now both the server executes its own code independendtly, will the synchronized code be synchronized or both the servers will run it own code.
posted 13 years ago
Synchronization doesn't work between different JVMs, only between threads in the same JVM. Does that answer your question?
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus