Package javax.transaction

Examples of javax.transaction.HeuristicMixedException


        throw new HeuristicRollbackException();
      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


        break;
      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

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

        break;
      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());
            }
         }
      }
   }
View Full Code Here

         try {
            //we only do 2-phase commits
            res.commit(xid, false);
         } catch (XAException e) {
            log.warn("exception while committing", e);
            throw new HeuristicMixedException(e.getMessage());
         }
      }
   }
View Full Code Here

      for (XAResource res : resources) {
         try {
            res.commit(xid, false);//todo we only support one phase commit for now, change this!!!
         } catch (XAException e) {
            log.warn("exception while committing", e);
            throw new HeuristicMixedException(e.getMessage());
         }
      }
      return true;
   }
View Full Code Here

    @Test( expected = RuntimeException.class )
    public void commitWithHeuristicMixedException()
        throws Exception
    {
        doThrow( new HeuristicMixedException() ).when( txn ).commit();
        sut.commit();
    }
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

               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.