0

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?

Cœur
  • 37,241
  • 25
  • 195
  • 267
DD.
  • 21,498
  • 52
  • 157
  • 246
  • thanks for your very useful comment...maybe i should tick answers which are wrong or make up answers for unanswered questions? thxs for your constructive input. – DD. Nov 01 '10 at 15:30

2 Answers2

1

If the thick client is updating your database directly, then you have two options:

  • Use database specific event notification. Capabilities and techniques vary greatly depending on database.
  • Have the server-side application poll the database looking for changes.

Assuming your thick client updates the database through a server-side application then you have multiple options depending on actual design and implementation:

Community
  • 1
  • 1
kaliatech
  • 17,579
  • 5
  • 72
  • 84
  • The client will persist directly to the DB. Could I use some kind of JMS messaging to alert the server instead of polling? – DD. Nov 01 '10 at 14:54
  • Something will have to initiate the JMS message. Are you asking if your Swing client could initiate the JMS message? Of course, and the server application could then receive the message. Regardless of JMS use though (which is just an alternative communications layer), I think it's still the same question/answer. Specifically, who/what will initiate the notification event on change. – kaliatech Nov 01 '10 at 20:27
0

What about making the Swing GUI app talk to server side app which talk to the db:

SwingGui -> ServerSideApp -> DB
Clients <-> ServerSideApp <-> DB
Boris Pavlović
  • 63,078
  • 28
  • 122
  • 148