ozeigermann 2004/12/15 08:38:41
Modified: src/share/org/apache/slide/store AbstractStore.java
Log:
Rethrow Errors instead of wrapping them in SAE. This is cleaner for one,
but most important allows ConcurrencyConflict (Error) to fall through to
WebDAV
layer
Revision Changes Path
1.50 +98 -5
jakarta-slide/src/share/org/apache/slide/store/AbstractStore.java
Index: AbstractStore.java
===================================================================
RCS file:
/home/cvs/jakarta-slide/src/share/org/apache/slide/store/AbstractStore.java,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -r1.49 -r1.50
--- AbstractStore.java 29 Oct 2004 13:32:03 -0000 1.49
+++ AbstractStore.java 15 Dec 2004 16:38:41 -0000 1.50
@@ -684,6 +684,9 @@
// transaction won't be always rolledback when committed)
delist(nodeStore);
throw e;
+ } catch (Error e) {
+ delist(nodeStore, false);
+ throw e;
} catch (Throwable t) {
delist(nodeStore, false);
// Wrap everything else in a ServiceAccessException
@@ -697,6 +700,8 @@
throw e;
} catch (ObjectNotFoundException e) {
throw e;
+ } catch (Error e) {
+ throw e;
} catch (Throwable t) {
// Wrap everything else in a ServiceAccessException
throw new ServiceAccessException(nodeStore, t);
@@ -727,6 +732,9 @@
} catch (ObjectNotFoundException e) {
delist(nodeStore);
throw e;
+ } catch (Error e) {
+ delist(nodeStore, false);
+ throw e;
} catch (Throwable t) {
delist(nodeStore, false);
// Wrap everything else in a ServiceAccessException
@@ -767,6 +775,9 @@
} catch (ObjectAlreadyExistsException e) {
delist(nodeStore);
throw e;
+ } catch (Error e) {
+ delist(nodeStore, false);
+ throw e;
} catch (Throwable t) {
delist(nodeStore, false);
// Wrap everything else in a ServiceAccessException
@@ -795,6 +806,9 @@
} catch (ObjectNotFoundException e) {
delist(nodeStore);
throw e;
+ } catch (Error e) {
+ delist(nodeStore, false);
+ throw e;
} catch (Throwable t) {
delist(nodeStore, false);
// Wrap everything else in a ServiceAccessException
@@ -820,6 +834,9 @@
} catch (ServiceAccessException e) {
delist(securityStore, false);
throw e;
+ } catch (Error e) {
+ delist(securityStore, false);
+ throw e;
} catch (Throwable t) {
delist(securityStore, false);
// Wrap everything else in a ServiceAccessException
@@ -844,6 +861,9 @@
} catch (ServiceAccessException e) {
delist(securityStore, false);
throw e;
+ } catch (Error e) {
+ delist(securityStore, false);
+ throw e;
} catch (Throwable t) {
delist(securityStore, false);
// Wrap everything else in a ServiceAccessException
@@ -867,6 +887,9 @@
} catch (ServiceAccessException e) {
delist(securityStore, false);
throw e;
+ } catch (Error e) {
+ delist(securityStore, false);
+ throw e;
} catch (Throwable t) {
delist(securityStore, false);
// Wrap everything else in a ServiceAccessException
@@ -895,6 +918,9 @@
} catch (ServiceAccessException e) {
delist(securityStore, false);
throw e;
+ } catch (Error e) {
+ delist(securityStore, false);
+ throw e;
} catch (Throwable t) {
delist(securityStore, false);
// Wrap everything else in a ServiceAccessException
@@ -908,6 +934,8 @@
return securityStore.enumeratePermissions(uri);
} catch (ServiceAccessException e) {
throw e;
+ } catch (Error e) {
+ throw e;
} catch (Throwable t) {
// Wrap everything else in a ServiceAccessException
throw new ServiceAccessException
@@ -932,6 +960,9 @@
} catch (ServiceAccessException e) {
delist(lockStore, false);
throw e;
+ } catch (Error e) {
+ delist(lockStore, false);
+ throw e;
} catch (Throwable t) {
delist(lockStore, false);
// Wrap everything else in a ServiceAccessException
@@ -960,6 +991,9 @@
} catch (LockTokenNotFoundException e) {
delist(lockStore);
throw e;
+ } catch (Error e) {
+ delist(lockStore, false);
+ throw e;
} catch (Throwable t) {
delist(lockStore, false);
// Wrap everything else in a ServiceAccessException
@@ -988,6 +1022,9 @@
} catch (LockTokenNotFoundException e) {
delist(lockStore);
throw e;
+ } catch (Error e) {
+ delist(lockStore, false);
+ throw e;
} catch (Throwable t) {
delist(lockStore, false);
// Wrap everything else in a ServiceAccessException
@@ -1016,6 +1053,9 @@
} catch (LockTokenNotFoundException e) {
delist(lockStore);
throw e;
+ } catch (Error e) {
+ delist(lockStore, false);
+ throw e;
} catch (Throwable t) {
delist(lockStore, false);
// Wrap everything else in a ServiceAccessException
@@ -1043,6 +1083,9 @@
} catch (ServiceAccessException e) {
delist(lockStore, false);
throw e;
+ } catch (Error e) {
+ delist(lockStore, false);
+ throw e;
} catch (Throwable t) {
delist(lockStore, false);
// Wrap everything else in a ServiceAccessException
@@ -1055,6 +1098,8 @@
return lockStore.enumerateLocks(uri);
} catch (ServiceAccessException e) {
throw e;
+ } catch (Error e) {
+ throw e;
} catch (Throwable t) {
// Wrap everything else in a ServiceAccessException
throw new ServiceAccessException(lockStore, t);
@@ -1086,6 +1131,9 @@
// Normal read failures aren't considered fatal
delist(revisionDescriptorsStore);
throw e;
+ } catch (Error e) {
+ delist(revisionDescriptorsStore, false);
+ throw e;
} catch (Throwable t) {
delist(revisionDescriptorsStore, false);
// Wrap everything else in a ServiceAccessException
@@ -1101,6 +1149,8 @@
throw e;
} catch (RevisionDescriptorNotFoundException e) {
throw e;
+ } catch (Error e) {
+ throw e;
} catch (Throwable t) {
// Wrap everything else in a ServiceAccessException
throw new ServiceAccessException
@@ -1130,6 +1180,9 @@
} catch (ServiceAccessException e) {
delist(revisionDescriptorsStore, false);
throw e;
+ } catch (Error e) {
+ delist(revisionDescriptorsStore, false);
+ throw e;
} catch (Throwable t) {
delist(revisionDescriptorsStore, false);
// Wrap everything else in a ServiceAccessException
@@ -1163,7 +1216,10 @@
} catch (RevisionDescriptorNotFoundException e) {
delist(revisionDescriptorsStore);
throw e;
- } catch (Throwable t) {
+ } catch (Error e) {
+ delist(revisionDescriptorsStore, false);
+ throw e;
+ } catch (Throwable t) {
delist(revisionDescriptorsStore, false);
// Wrap everything else in a ServiceAccessException
throw new ServiceAccessException
@@ -1187,6 +1243,9 @@
} catch (ServiceAccessException e) {
delist(revisionDescriptorsStore, false);
throw e;
+ } catch (Error e) {
+ delist(revisionDescriptorsStore, false);
+ throw e;
} catch (Throwable t) {
delist(revisionDescriptorsStore, false);
// Wrap everything else in a ServiceAccessException
@@ -1220,6 +1279,9 @@
// Normal read failures aren't considered fatal
delist(revisionDescriptorStore);
throw e;
+ } catch (Error e) {
+ delist(revisionDescriptorsStore, false);
+ throw e;
} catch (Throwable t) {
delist(revisionDescriptorStore, false);
// Wrap everything else in a ServiceAccessException
@@ -1236,6 +1298,8 @@
throw e;
} catch (RevisionDescriptorNotFoundException e) {
throw e;
+ } catch (Error e) {
+ throw e;
} catch (Throwable t) {
// Wrap everything else in a ServiceAccessException
throw new ServiceAccessException
@@ -1272,6 +1336,10 @@
delist (propertiesIndexer, false);
delist(revisionDescriptorStore, false);
throw e;
+ } catch (Error e) {
+ delist (propertiesIndexer, false);
+ delist(revisionDescriptorStore, false);
+ throw e;
} catch (Throwable t) {
delist (propertiesIndexer, false);
delist(revisionDescriptorStore, false);
@@ -1314,6 +1382,10 @@
delist (propertiesIndexer);
delist(revisionDescriptorStore);
throw e;
+ } catch (Error e) {
+ delist (propertiesIndexer, false);
+ delist(revisionDescriptorStore, false);
+ throw e;
} catch (Throwable t) {
delist (propertiesIndexer, false);
delist(revisionDescriptorStore, false);
@@ -1348,6 +1420,10 @@
delist(propertiesIndexer, false);
delist(revisionDescriptorStore, false);
throw e;
+ } catch (Error e) {
+ delist (propertiesIndexer, false);
+ delist(revisionDescriptorStore, false);
+ throw e;
} catch (Throwable t) {
delist(propertiesIndexer, false);
delist(revisionDescriptorStore, false);
@@ -1385,6 +1461,9 @@
// Normal read failures aren't considered fatal
delist(contentStore);
throw e;
+ } catch (Error e) {
+ delist(contentStore, false);
+ throw e;
} catch (Throwable t) {
delist(contentStore, false);
// Wrap everything else in a ServiceAccessException
@@ -1401,6 +1480,8 @@
throw e;
} catch (RevisionNotFoundException e) {
throw e;
+ } catch (Error e) {
+ throw e;
} catch (Throwable t) {
// Wrap everything else in a ServiceAccessException
throw new ServiceAccessException
@@ -1442,6 +1523,10 @@
delist(contentIndexer);
delist(contentStore);
throw e;
+ } catch (Error e) {
+ delist(contentIndexer, false);
+ delist(contentStore, false);
+ throw e;
} catch (Throwable t) {
delist(contentIndexer, false);
delist(contentStore, false);
@@ -1481,6 +1566,10 @@
delist(contentIndexer);
delist(contentStore);
throw e;
+ } catch (Error e) {
+ delist(contentIndexer, false);
+ delist(contentStore, false);
+ throw e;
} catch (Throwable t) {
delist(contentIndexer, false);
delist(contentStore, false);
@@ -1513,6 +1602,10 @@
contentStore.removeRevisionContent(uri, revisionDescriptor);
} catch (ServiceAccessException e) {
+ delist(contentIndexer, false);
+ delist(contentStore, false);
+ throw e;
+ } catch (Error e) {
delist(contentIndexer, false);
delist(contentStore, false);
throw e;
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]