Package javax.transaction

Examples of javax.transaction.RollbackException.initCause()


                        if(preexistingRollbackOnlyCallerStacktrace != null) {
                            // we rolled back because the user (note: NOT a beforeCompletion) explicitly told us not to commit.
                            // beforeCompletions should not be called in such case anyhow, so getDeferredThrowable is irrelevant.
                            // Attach the trace of who did that for debug:
                            rollbackException.initCause(preexistingRollbackOnlyCallerStacktrace);
                        } else if(_theTransaction.getDeferredThrowable() != null) {
                            // problems occurring during beforeCompletion (the only place deferredThrowable is set) take priority
                            // over 'immediately prior' (i.e. after the commit call - likely from within beforeCompletion) calls to setRollbackOnly
                            // despite the small chance that the causal relationship is not infact valid
                            rollbackException.initCause(_theTransaction.getDeferredThrowable());
View Full Code Here


                            rollbackException.initCause(preexistingRollbackOnlyCallerStacktrace);
                        } else if(_theTransaction.getDeferredThrowable() != null) {
                            // problems occurring during beforeCompletion (the only place deferredThrowable is set) take priority
                            // over 'immediately prior' (i.e. after the commit call - likely from within beforeCompletion) calls to setRollbackOnly
                            // despite the small chance that the causal relationship is not infact valid
                            rollbackException.initCause(_theTransaction.getDeferredThrowable());
            } else if(_rollbackOnlyCallerStacktrace != null) {
                            // we tried to commit but it went wrong, resulting in a call to setRollbackOnly from within a
                            // beforeCompletion. The beforeCompletion did not then throw an exception as that would be handled above
              rollbackException.initCause(_rollbackOnlyCallerStacktrace);
                        }
View Full Code Here

                            // despite the small chance that the causal relationship is not infact valid
                            rollbackException.initCause(_theTransaction.getDeferredThrowable());
            } else if(_rollbackOnlyCallerStacktrace != null) {
                            // we tried to commit but it went wrong, resulting in a call to setRollbackOnly from within a
                            // beforeCompletion. The beforeCompletion did not then throw an exception as that would be handled above
              rollbackException.initCause(_rollbackOnlyCallerStacktrace);
                        }

            throw rollbackException;
          default:
            throw new InvalidTerminationStateException(
View Full Code Here

                } catch (XAException e) {
                    synchronized (this) {
                        status = Status.STATUS_ROLLEDBACK;
                    }
                    RollbackException ex = new RollbackException("Error during one-phase commit");
                    ex.initCause(e);
                    throw ex;
                }
            }

            // two-phase
View Full Code Here

                } catch (XAException e) {
                    synchronized (this) {
                        status = Status.STATUS_ROLLEDBACK;
                    }
                    RollbackException ex = new RollbackException("Error during one-phase commit");
                    ex.initCause(e);
                    throw ex;
                }
            }

            // two-phase
View Full Code Here

/*      */       case 11:
/*  255 */         RollbackException rollbackException = new RollbackException(jtaLogger.logMesg.getString("com.arjuna.ats.internal.jta.transaction.arjunacore.commitwhenaborted"));
/*      */
/*  258 */         if (this._theTransaction.getDeferredThrowable() != null)
/*      */         {
/*  260 */           rollbackException.initCause(this._theTransaction.getDeferredThrowable());
/*      */         }
/*      */
/*  263 */         throw rollbackException;
/*      */       case 5:
/*      */       case 8:
View Full Code Here

/*      */         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) {
/* 1403 */             rollbackException.initCause(this._theTransaction.getDeferredThrowable());
/*      */           }
/* 1405 */           throw rollbackException;
/*      */         case 3:
/*      */         case 5:
/*      */         case 8:
View Full Code Here

      catch (TRANSACTION_ROLLEDBACK e4)
      {
        RollbackException rollbackException = new RollbackException(e4.toString());
                if(_rollbackOnlyCallerStacktrace != null) {
                    // we rolled back beacuse the user explicitly told us not to commit. Attach the trace of who did that for debug:
                    rollbackException.initCause(_rollbackOnlyCallerStacktrace);
                }
                throw rollbackException;
      }
      catch (org.omg.CORBA.NO_PERMISSION e5)
      {
View Full Code Here

        RollbackException rollbackException = new RollbackException(
            jtaLogger.logMesg
                .getString("com.arjuna.ats.internal.jta.transaction.arjunacore.commitwhenaborted"));
        if (_theTransaction.getDeferredThrowable() != null)
        {
          rollbackException.initCause(_theTransaction
              .getDeferredThrowable());
        }
        throw rollbackException;
      default:
        throw new IllegalStateException(
View Full Code Here

          case ActionStatus.ABORTED:
          case ActionStatus.ABORTING:
                        RollbackException rollbackException = new RollbackException(jtaLogger.logMesg.getString("com.arjuna.ats.internal.jta.transaction.arjunacore.commitwhenaborted"));
                        if(_rollbackOnlyCallerStacktrace != null) {
                            // we rolled back beacuse the user explicitly told us not to commit. Attach the trace of who did that for debug:
                            rollbackException.initCause(_rollbackOnlyCallerStacktrace);
                        }
                        else if(_theTransaction.getDeferredThrowable() != null) {
                            // we tried to commit but it went wrong - attach the reason for debug:
              rollbackException.initCause(_theTransaction.getDeferredThrowable());
            }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.