Commit b1adacbbc9bb6037223eee05518956d15ba45352
1 parent
de2ea41f
Exists in
master
Ajuste da exceção lançada nos métodos da classe JTATransaction, de
TransactionException para DemoiselleException.
Showing
1 changed file
with
7 additions
and
6 deletions
Show diff stats
impl/extension/jta/src/main/java/br/gov/frameworkdemoiselle/transaction/JTATransaction.java
| ... | ... | @@ -44,6 +44,7 @@ import static javax.transaction.Status.STATUS_ROLLEDBACK; |
| 44 | 44 | import javax.transaction.SystemException; |
| 45 | 45 | import javax.transaction.UserTransaction; |
| 46 | 46 | |
| 47 | +import br.gov.frameworkdemoiselle.DemoiselleException; | |
| 47 | 48 | import br.gov.frameworkdemoiselle.annotation.Priority; |
| 48 | 49 | import br.gov.frameworkdemoiselle.util.Beans; |
| 49 | 50 | |
| ... | ... | @@ -69,7 +70,7 @@ public class JTATransaction implements Transaction { |
| 69 | 70 | return getDelegate().getStatus() != STATUS_NO_TRANSACTION; |
| 70 | 71 | |
| 71 | 72 | } catch (SystemException cause) { |
| 72 | - throw new TransactionException(cause); | |
| 73 | + throw new DemoiselleException(cause); | |
| 73 | 74 | } |
| 74 | 75 | } |
| 75 | 76 | |
| ... | ... | @@ -80,7 +81,7 @@ public class JTATransaction implements Transaction { |
| 80 | 81 | || getDelegate().getStatus() == STATUS_ROLLEDBACK; |
| 81 | 82 | |
| 82 | 83 | } catch (SystemException cause) { |
| 83 | - throw new TransactionException(cause); | |
| 84 | + throw new DemoiselleException(cause); | |
| 84 | 85 | } |
| 85 | 86 | } |
| 86 | 87 | |
| ... | ... | @@ -90,7 +91,7 @@ public class JTATransaction implements Transaction { |
| 90 | 91 | getDelegate().begin(); |
| 91 | 92 | |
| 92 | 93 | } catch (Exception cause) { |
| 93 | - throw new TransactionException(cause); | |
| 94 | + throw new DemoiselleException(cause); | |
| 94 | 95 | } |
| 95 | 96 | } |
| 96 | 97 | |
| ... | ... | @@ -100,7 +101,7 @@ public class JTATransaction implements Transaction { |
| 100 | 101 | getDelegate().commit(); |
| 101 | 102 | |
| 102 | 103 | } catch (Exception cause) { |
| 103 | - throw new TransactionException(cause); | |
| 104 | + throw new DemoiselleException(cause); | |
| 104 | 105 | } |
| 105 | 106 | } |
| 106 | 107 | |
| ... | ... | @@ -110,7 +111,7 @@ public class JTATransaction implements Transaction { |
| 110 | 111 | getDelegate().rollback(); |
| 111 | 112 | |
| 112 | 113 | } catch (SystemException cause) { |
| 113 | - throw new TransactionException(cause); | |
| 114 | + throw new DemoiselleException(cause); | |
| 114 | 115 | } |
| 115 | 116 | } |
| 116 | 117 | |
| ... | ... | @@ -120,7 +121,7 @@ public class JTATransaction implements Transaction { |
| 120 | 121 | getDelegate().setRollbackOnly(); |
| 121 | 122 | |
| 122 | 123 | } catch (SystemException cause) { |
| 123 | - throw new TransactionException(cause); | |
| 124 | + throw new DemoiselleException(cause); | |
| 124 | 125 | } |
| 125 | 126 | } |
| 126 | 127 | } | ... | ... |