Explanation for delay of live data presentation after a JDataStore app terminates.

By: Ben Matterson

Abstract: When a JDataStore application terminates there is an 8-second delay in the live data in the designer. Why?

Question: Why is there an 8 second delay for showing live data in the designer after an application using a DataStore terminates?

Answer: If the terminating application does not close any open DataStore, any other process must verify that the DataStore is not still open. This takes about 8 seconds. To avoid this delay, close all DataStores before exiting your application. For applications that use frames, you can trigger this from the windowClosing event. To wire this event,

  1. Select the frame (this).
  2. Select the event tab.
  3. Double-click on windowClosing. This opens the source code, with the cursor in the event handler. Put your DataStore closing code here (e.g.: dataStore.shutdown()).
If you are using a JdbTable or any other dbSwing control, you can drop a dbDisposeMonitor on the same frame and set its dataAwareControl property to this. The monitor will close the store for you. The Designer will come up quickly and the data will show up soon after that.

Server Response from: ETNASC04