1 24 package org.objectweb.jalisto.se.exception; 25 26 public class TransactionException extends JalistoException { 27 public TransactionException() { 28 } 29 30 public TransactionException(String s) { 31 super(s); 32 } 33 34 public TransactionException(String s, Throwable throwable) { 35 super(s, throwable); 36 } 37 38 public TransactionException(Throwable throwable) { 39 super(throwable); 40 } 41 42 public boolean isOptimisticException() { 43 return optimistic; 44 } 45 46 public boolean isPessimisticException() { 47 return pessimistic; 48 } 49 50 public boolean isConcurrencyException() { 51 return (optimistic || pessimistic); 52 } 53 54 public void setOptimistic() { 55 pessimistic = false; 56 optimistic = true; 57 } 58 59 public void setPessimistic() { 60 pessimistic = true; 61 optimistic = false; 62 } 63 64 private boolean optimistic = false; 65 private boolean pessimistic = false; 66 } 67 | Popular Tags |