Package javax.transaction

Examples of javax.transaction.HeuristicMixedException


/*      */         {
/*      */         case 6:
/*      */         case 7:
/* 1393 */           break;
/*      */         case 13:
/* 1395 */           throw new HeuristicMixedException();
/*      */         case 14:
/* 1397 */           throw new HeuristicMixedException();
/*      */         case 2:
/*      */         case 4:
/*      */         case 11:
/* 1401 */           RollbackException rollbackException = new RollbackException(jtaLogger.logMesg.getString("com.arjuna.ats.internal.jta.transaction.arjunacore.commitwhenaborted"));
/* 1402 */           if (this._theTransaction.getDeferredThrowable() != null) {
View Full Code Here


/* 179 */         throw new HeuristicRollbackException();
/*     */       case 11:
/* 181 */         throw new HeuristicRollbackException();
/*     */       case 13:
/*     */       case 14:
/* 184 */         throw new HeuristicMixedException();
/*     */       case 9:
/* 186 */         removeTransaction(this);
/*     */
/* 188 */         throw new IllegalStateException();
/*     */       case 3:
/*     */       case 5:
/*     */       case 8:
/*     */       case 10:
/*     */       default:
/* 190 */         throw new HeuristicMixedException();
/*     */       }
/*     */
/*     */     }
/*     */     catch (ClassCastException ex)
/*     */     {
View Full Code Here

/* 227 */         break;
/*     */       case 12:
/* 229 */         throw new HeuristicCommitException();
/*     */       case 13:
/*     */       case 14:
/* 232 */         throw new HeuristicMixedException();
/*     */       case 3:
/*     */       case 5:
/*     */       case 6:
/*     */       case 7:
/*     */       case 8:
/*     */       case 9:
/*     */       case 10:
/*     */       default:
/* 234 */         throw new HeuristicMixedException();
/*     */       }
/*     */     }
/*     */     catch (ClassCastException ex)
/*     */     {
/* 239 */       ex.printStackTrace();
View Full Code Here

  public void testJtaTransactionManagerWithHeuristicMixedExceptionOnCommit() throws Exception {
    UserTransaction ut = mock(UserTransaction.class);
    given(ut.getStatus()).willReturn(Status.STATUS_NO_TRANSACTION,
        Status.STATUS_ACTIVE, Status.STATUS_ACTIVE);
    willThrow(new HeuristicMixedException("heuristic exception")).given(ut).commit();

    try {
      JtaTransactionManager ptm = newJtaTransactionManager(ut);
      TransactionTemplate tt = new TransactionTemplate(ptm);
      tt.execute(new TransactionCallbackWithoutResult() {
View Full Code Here

               try {
                  //we only do 2-phase commits
                  res.commit(xid, false);
               } catch (XAException e) {
                  log.errorCommittingTx(e);
                  throw new HeuristicMixedException(e.getMessage());
               }
            }
         }
         status = Status.STATUS_COMMITTED;
      } catch (HeuristicMixedException e) {
View Full Code Here

                illegalStateException.initCause(e1);
                throw illegalStateException;
      }
      catch (org.omg.CosTransactions.HeuristicMixed e2)
      {
                HeuristicMixedException heuristicMixedException = new javax.transaction.HeuristicMixedException();
                heuristicMixedException.initCause(e2);
                throw heuristicMixedException;
      }
      catch (org.omg.CosTransactions.HeuristicHazard e3)
      {
                HeuristicMixedException heuristicMixedException = new javax.transaction.HeuristicMixedException();
                heuristicMixedException.initCause(e3);
                throw heuristicMixedException;
      }
      catch (TRANSACTION_ROLLEDBACK e4)
      {
                RollbackException rollbackException = new RollbackException(e4.toString());
View Full Code Here

        throw new IllegalStateException(
            jtaLogger.loggerI18N.getString("com.arjuna.ats.internal.jta.transaction.jts.notx"), e1);
      }
      catch (org.omg.CosTransactions.HeuristicMixed e2)
      {
                HeuristicMixedException heuristicMixedException = new javax.transaction.HeuristicMixedException();
                heuristicMixedException.initCause(e2);
                throw heuristicMixedException;
      }
      catch (org.omg.CosTransactions.HeuristicHazard e3)
      {
                HeuristicMixedException heuristicMixedException = new javax.transaction.HeuristicMixedException();
                heuristicMixedException.initCause(e3);
                throw heuristicMixedException;
      }
      catch (TRANSACTION_ROLLEDBACK e4)
      {
        RollbackException rollbackException = new RollbackException(e4.toString());
View Full Code Here

                        case ActionStatus.ABORTING:
                        case ActionStatus.H_ROLLBACK:
                                throw new HeuristicRollbackException();
                        case ActionStatus.H_HAZARD:
                        case ActionStatus.H_MIXED:
                            throw new HeuristicMixedException();
                        case ActionStatus.INVALID:
                                throw new IllegalStateException();
                        default:
                                throw new HeuristicMixedException(); // not sure what happened,
                        // so err on the safe side!
                        }
                }
                catch (ClassCastException ex)
                {
View Full Code Here

                        case ActionStatus.COMMITTING:
                        case ActionStatus.H_COMMIT:
                                throw new HeuristicCommitException();
                        case ActionStatus.H_HAZARD:
                        case ActionStatus.H_MIXED:
                                throw new HeuristicMixedException();
                        default:
                                throw new HeuristicMixedException();
                        }
                }
                catch (ClassCastException ex)
                {
                    ex.printStackTrace();
View Full Code Here

               try {
                  //we only do 2-phase commits
                  res.commit(xid, false);
               } catch (XAException e) {
                  log.errorCommittingTx(e);
                  throw new HeuristicMixedException(e.getMessage());
               }
            }
         }
         status = Status.STATUS_COMMITTED;
      } catch (HeuristicMixedException e) {
View Full Code Here

TOP

Related Classes of javax.transaction.HeuristicMixedException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.