Java Desktop Application For Network users
Posted
by
Motasem Abu Aker
on Programmers
See other posts from Programmers
or by Motasem Abu Aker
Published on 2013-10-31T17:10:06Z
Indexed on
2013/10/31
22:17 UTC
Read the original article
Hit count: 330
I'm developing a desktop application using Java. My application will run in a network environment where multiple users will access the same database through the application.
There will be basic CRUD opreations (Insert, Update, Delete, & select), which means there will be chances of deadlock, or two users trying to update the same record at same time.
I'm using the following
- Java Swing for Clients (MVC).
- MySQL Server for database (InnODB).
- Java Web start.
Now, MySQL is centralized on the network, and all of the clients connect to it. The Application for ERP Purpose.
I searched the internet to find a very good solution to ensure data integrity & to make sure that when updating one record from one client, other clients are aware of it.
I read about Socket-server-client & RESTful web services.
I don't want to go web application & don't want to use any extra libraries.
So how can I handle this scenario:
If User A updates a record:
- Is there a way to update User B's screen with the new value?
- If user A starts updating a record, how can I prevent other users from attempting to update the same record?
© Programmers or respective owner