I have two applications. One is a Java thick client Swing GUI for controlling some parameters which are stored in the DB. The other is a Java EE server side application which sends XML streams clients based on the parameters set by the GUI.
I would like the server side app to update its state as soon as the Swing GUI persists changes to the DB. What would be the best way of achieving this?
If the thick client is updating your database directly, then you have two options:
Assuming your thick client updates the database through a server-side application then you have multiple options depending on actual design and implementation:
You could implement an observable pattern in your domain objects so that your server application can be notified anytime important domain objects are changed.
If using Hibernate, you could use Hibernate interceptors and events.
You could use a caching solution, such as Ehcache. (If you need transactional semantics, then perhaps JBoss Cache.)
You could use shared memory solutions such as Terracotta or Hazelcast.