1.1 --- a/mdr/src/org/netbeans/mdr/NBMDRepositoryImpl.java Tue Sep 07 18:43:32 2004 +0000
1.2 +++ b/mdr/src/org/netbeans/mdr/NBMDRepositoryImpl.java Thu Sep 09 15:28:41 2004 +0000
1.3 @@ -405,6 +405,7 @@
1.4 }
1.5 }
1.6 notifyShutdownListeners();
1.7 + notifyShutdownStep();
1.8 }
1.9
1.10 /* -------------------------------------------------------------------- */
1.11 @@ -686,6 +687,19 @@
1.12 }
1.13 }
1.14
1.15 + public int getShutdownSteps() {
1.16 + return mdrStorage != null ? mdrStorage.getShutdownSteps() + 1 : 1;
1.17 + }
1.18 +
1.19 + public void notifyShutdownStep() {
1.20 + synchronized (shutdownListeners) {
1.21 + for (Iterator iter = shutdownListeners.iterator(); iter.hasNext();) {
1.22 + ShutdownListener listener = (ShutdownListener) iter.next();
1.23 + listener.stepFinished();
1.24 + }
1.25 + }
1.26 + }
1.27 +
1.28 /* -------------------------------------------------------------------- */
1.29 /* -- Private helper methods ------------------------------------------ */
1.30 /* -------------------------------------------------------------------- */
1.31 @@ -1433,6 +1447,8 @@
1.32
1.33 public interface ShutdownListener {
1.34 public void shutdown();
1.35 +
1.36 + public void stepFinished();
1.37 }
1.38
1.39
2.1 --- a/mdr/src/org/netbeans/mdr/storagemodel/MdrStorage.java Tue Sep 07 18:43:32 2004 +0000
2.2 +++ b/mdr/src/org/netbeans/mdr/storagemodel/MdrStorage.java Thu Sep 09 15:28:41 2004 +0000
2.3 @@ -583,12 +583,18 @@
2.4 for (Iterator it = this.storages.values().iterator(); it.hasNext();) {
2.5 Storage s = (Storage)it.next();
2.6 s.shutDown();
2.7 + repository.notifyShutdownStep();
2.8 }
2.9 } finally {
2.10 eventNotifier.shutdown();
2.11 + repository.notifyShutdownStep();
2.12 }
2.13 }
2.14
2.15 + public int getShutdownSteps() {
2.16 + return storages.size() + 1;
2.17 + }
2.18 +
2.19 /* -------------------------------------------------------------------- */
2.20 /* -- Storage properties accessors & mutators ------------------------- */
2.21 /* -------------------------------------------------------------------- */