Forums Register Login

How to ensure no other application is accessing my DB when I am accessing it?

+Pie Number of slices to send: Send
i would be doing some operation with my DB. now mine is a JEE application and am using JPA. when i am dealing with my DB (or data), its quite possible that some other legacy application might also be manipulating the same data, since there are quite a few appliations accessing the same DB. Now i do not want the other application to access my data when i am dealing with it. How could i achieve this exclusive access so that no other application can possible corrupt my data.
+Pie Number of slices to send: Send
If you are using a different user, you shouldn't have anything to worry about.
+Pie Number of slices to send: Send
and what if they are the same user? how to proceed in this case?
+Pie Number of slices to send: Send
Hi Aryan,

You should use the optmistic or pessimistic locks for hadling concurrent access.

Take a look at those locks and choose the best solution for your system!
+Pie Number of slices to send: Send
so having proper locking strategy should prevent such issues right?
+Pie Number of slices to send: Send
 

aryan Sharma wrote:so having proper locking strategy should prevent such issues right?



That is the basic idea of using proper locking mechanism. Are you facing any issues with that ?
I brought this back from the farm where they grow the tiny ads:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 941 times.
Similar Threads
How to send Key/Value pair bak to Servlet from Struts??
Getting lock on DB from two different JVM
Implementing multi-tire application and persistent DB connection in WebLogic
NX: Core distributed computing concept and locking
Remote JDBC connection performance question
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 04:24:15.