Fix of event rethrow BLD200211290100
authortzezula@netbeans.org
Thu, 28 Nov 2002 19:50:33 +0000
changeset 1138ef8e0c79b436
parent 1137 fefa1f9631ff
child 1139 2121ed6ab839
Fix of event rethrow
mdr/src/org/netbeans/mdr/storagemodel/MdrStorage.java
     1.1 --- a/mdr/src/org/netbeans/mdr/storagemodel/MdrStorage.java	Wed Nov 27 16:14:57 2002 +0000
     1.2 +++ b/mdr/src/org/netbeans/mdr/storagemodel/MdrStorage.java	Thu Nov 28 19:50:33 2002 +0000
     1.3 @@ -384,7 +384,7 @@
     1.4              storage.open(false, this);
     1.5              storageId = storage.getStorageId();
     1.6              // read indexes
     1.7 -            initializeIndexes(storage, defaultStorage);
     1.8 +            initializeIndexes(storage, defaultStorage, false);
     1.9              // everything succeeded -> return true
    1.10              result = true;
    1.11          } catch (Exception e) {
    1.12 @@ -433,7 +433,7 @@
    1.13       * @throws DebugExceptions if any of the global indices was not found or
    1.14       *
    1.15       */
    1.16 -    private void initializeIndexes(Storage storage, boolean defaultStorage) throws StorageException {
    1.17 +    private void initializeIndexes(Storage storage, boolean defaultStorage, boolean rollBack) throws StorageException {
    1.18          // get the primary index
    1.19          String storageId = storage.getStorageId();
    1.20          SinglevaluedIndex objectsIndex = storage.getPrimaryIndex();
    1.21 @@ -442,7 +442,7 @@
    1.22          if (objByClsIndex==null || objectsIndex==null || contextsIndex==null) {
    1.23              throw new DebugException("Different storage version.");
    1.24          }
    1.25 -        if (!defaultStorage) {
    1.26 +        if (!defaultStorage && !rollBack) {
    1.27              // Fire events for adding all extents
    1.28              for (Iterator it = contextsIndex.keySet().iterator(); it.hasNext();) {
    1.29                  String extentName = (String) it.next();
    1.30 @@ -484,7 +484,7 @@
    1.31              storage.rollBackChanges();
    1.32              // reinitialize the global indices
    1.33              if (storage != transientStorage)
    1.34 -                initializeIndexes(storage, storage == this.bootStorage);
    1.35 +                initializeIndexes(storage, storage == this.bootStorage, true);
    1.36          }
    1.37      }
    1.38