Hi, There is a Java application say Data.java , which retrieves data from 'n' databases and updates the local DB. Its just like a scheduling prg., can be run at a particular time to accomplish the task. While running this application (java Data), admin wants to see the performance of this application thru a frame (awt) with progress bars showing query performance and reasons if any exceptions occurs. In the sense he wants to monitor the performance of running Data application. So two prgs running at the same time, one is dealing with DB and other is dealing with UI part(showing in progress bar). --> Is there any way to display UI part(showing progress) while Data application is running. I cant embed UI part in Data application(in same appli.) bcoz of performance issues since Data.java 's core aspect is to deal with DB part but not displaying UI. How to relate this two applications, according to my understanding even if u add listener (Observer pattern) to notify event should be present in single application( having one main method) know.
--> Is there any way to relate these two classes, while Data.java is running, UIPart.java has to display the performance simultaneously.
I can think of two ways: 1. Make the Data.java a RMI server. Data.java should also know its state (percentage completion etc). The GUI is also a RMI client and gets the information from the data.java at regular intervals. This is the method followed in SNMP based network monitoring apps 2. If you want to have a event based system, You can use remote events. Implement the notify() method of RemoteEventListener in GUI and dispatch the events from data.java Parind
Joined: Oct 31, 2000
Hi Parind, Thanx for ur response. Ur response is good indeed. But in my application cant use RMI concept since it has to run seperate processor like RMI registry. But ur second way sounds good, as it uses 'JavaSpaces' technology, is it possible to use it with JDK1.2. Iam looking for any help using JavaSpaces. Thanks, Anil