File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes Sychronize across JVM's Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Sychronize across JVM Watch "Sychronize across JVM New topic
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Sychronize across JVM's
 
Similar Threads
Question For Thread Guru's ..
How many objects created
Getting lock on DB from two different JVM
calculate heap info
Sharing Variables