| Author |
Sychronize across JVM's
|
Mohammad Jaber
Ranch Hand
Joined: Apr 10, 2006
Posts: 46
|
|
Hi , how can i sychronize a certain code among JVM's levels , on other word i have a Clustered Env. and i want to make sure that a pice of code to be executed Synch. at a time amoung all of the Clustered JVM's ... Thanks
|
OCP , SCJP 5.0
|
 |
Paul Sturrock
Bartender
Joined: Apr 14, 2004
Posts: 10336
|
|
|
Sounds slightly counterintuitive. What have you included in your architecture that requires synchronization?
|
JavaRanch FAQ HowToAskQuestionsOnJavaRanch
|
 |
Mohammad Jaber
Ranch Hand
Joined: Apr 10, 2006
Posts: 46
|
|
|
well , i have an ID's generation table on my DB , that is resposible of generating the ID's of my entities according to some Custom rules , this process requires read and write to that table , so synchronization should be garanteed , Thanks
|
 |
Stan James
(instanceof Sidekick)
Ranch Hand
Joined: Jan 29, 2003
Posts: 8791
|
|
|
Database transactions and locks should do this for you. They're generally great at concurrency if you get the options right.
|
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
|
 |
Mr. C Lamont Gilbert
Ranch Hand
Joined: Oct 05, 2001
Posts: 1170
|
|
|
Let the database handle that if possible.
|
 |
 |
|
|
subject: Sychronize across JVM's
|
|
|