I have a very essential question about a basic concept regarding synchronization of multiple clients that share a common database:
I plan to design a distributed application using Java and JPA for persistence. Assumed that I have a central database that hosts all enterprise data and multiple clients connect to this database for querying data, what would be the best approach to keep the particular clients synchronized (in means of the data in the database) ?
E.g. Client A updates the surname of a customer while Client B is already logged in to the database and has retrieved it's persistence context. How can I inform Client B about the changes of the customers properties?
Is there any possibility in JPA to test entities in persistent-context on changes? Or do I need a JMS like network service that informs all active clients about any changes in the database?
Any suggestions highly appreciated! Thanks in advance...