I have three instances of same application running in different JVMs. I don't want a specific value in the data base to modified by different applications at the same time. How do I enforce this restriction in java?
It depends on the technology stack you are using.
select * from table_name for update
EntityManager.lock(entity)
/Session.lock(entity)
(something similar)Unless you provide more details of your problem, it's very difficult to give you a concrete suggestion.