mirror of https://github.com/apache/openjpa.git
OPENJPA-891 - Remove _recoverable attribute in StoreException and use _fatal instead, per Pinaki's suggestion.
git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@751109 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
cae33419ae
commit
70cfcaaee1
|
@ -4280,7 +4280,7 @@ public class DBDictionary
|
|||
storeEx = new StoreException(msg);
|
||||
}
|
||||
if (recoverable != null) {
|
||||
storeEx.setRecoverable(recoverable);
|
||||
storeEx.setFatal(!recoverable);
|
||||
}
|
||||
return storeEx;
|
||||
}
|
||||
|
|
|
@ -35,8 +35,6 @@ public class StoreException
|
|||
public static final int REFERENTIAL_INTEGRITY = 4;
|
||||
public static final int OBJECT_EXISTS = 5;
|
||||
|
||||
private boolean recoverable = false;
|
||||
|
||||
public StoreException(String msg) {
|
||||
super(msg);
|
||||
}
|
||||
|
@ -60,12 +58,4 @@ public class StoreException
|
|||
public int getType() {
|
||||
return STORE;
|
||||
}
|
||||
|
||||
public void setRecoverable(boolean recoverable) {
|
||||
this.recoverable = recoverable;
|
||||
}
|
||||
|
||||
public boolean isRecoverable() {
|
||||
return recoverable;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -165,7 +165,7 @@ public class PersistenceExceptions
|
|||
(ke instanceof LockException ? ke : cause);
|
||||
if (lockEx != null && lockEx.getLockLevel() >=
|
||||
JPA2LockLevels.LOCK_PESSIMISTIC_READ) {
|
||||
if (lockEx.isRecoverable()) {
|
||||
if (!lockEx.isFatal()) {
|
||||
e = new org.apache.openjpa.persistence
|
||||
.LockTimeoutException(
|
||||
ke.getMessage(), getNestedThrowables(ke),
|
||||
|
|
Loading…
Reference in New Issue