File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes Live update on applications Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Java in General
Reply Bookmark "Live update on applications" Watch "Live update on applications" New topic
Author

Live update on applications

Jennifer Sohl
Ranch Hand

Joined: Feb 28, 2001
Posts: 455
Hello. We have a java application that is used for System file maintenace, and another application where users enter orders. Each of these applications are run from seperate batch files. We recently ran into a problem with getting the current data to the users.
Here's the skinny...
The system maintenance application allows a manager to add/update customer codes.
The order entry application lists all customers in the database, so the user can assign an order to a certain customer.
The manager goes into system maintenance and wants to update a customer's name. So now the new customer name is in the database.
The problem...
Everyone who already has the order entry application open on their workstations, has the OLD Customer name listed. If they wanted the new information, they would have to close the application, and open it back up again.
As you can see, this is a problem.
We would like to be able to update everybody's live session on their workstations, whenever information like this is changed by the manager.
But how in the heck is that done?
I'm open to any suggestions!
Thanks!
Michael Morris
Ranch Hand

Joined: Jan 30, 2002
Posts: 3451
Sounds like a good job for RMI to me. You could have a single RMI service that is event driven. That event being an update to the database. The order application would locate the service, get a remote instance and register as a listener to that remote object. Whenever an event is fired, all clients could then refresh their data. The event can even encapsulate the row or whatever. I used a similar tactic in the Developer Certification as a server heartbeat. Events were fired on a regular basis so that clients knew that the server was still alive. The whole thing consisted of one interface and one class for each of the client and server and one class for the event itself.
Michael Morris
[ April 04, 2003: Message edited by: Michael Morris ]

Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius - and a lot of courage - to move in the opposite direction. - Ernst F. Schumacher
Marilyn de Queiroz
Sheriff

Joined: Jul 22, 2000
Posts: 9001
Kinda sounds like Java WebStart.


JavaBeginnersFaq
"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
Michael Morris
Ranch Hand

Joined: Jan 30, 2002
Posts: 3451
Or WebStart if you want to wimp out.
Jennifer Sohl
Ranch Hand

Joined: Feb 28, 2001
Posts: 455
Thanks for the input. Considering that I really have no clue as to what RMI is, and how it works, I think I'm gonna wimp out and try Java WebStart.
Is there like a tutorial or something on Java WebStart that I could use to get started? Or even any articles on it that would better help me understand all of the capabilities that WebStart has?
Thanks again!
 
 
subject: Live update on applications
 
Threads others viewed
is it good to carry the jdbc "Connection" over servlet and Actions ?
J2EE & EJB roles in Ireland
Using badges to authorize web app access
junior EJB developer in WebSphere
Test 252: Mock exam
MyEclipse, The Clear Choice