Package javax.transaction

Examples of javax.transaction.RollbackException.initCause()


                            // 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());
            }
            throw rollbackException;
          default:
            throw new InvalidTerminationStateException(
                jtaLogger.logMesg.getString("com.arjuna.ats.internal.jta.transaction.arjunacore.invalidstate"));
View Full Code Here


                throw heuristicMixedException;
      }
      catch (TRANSACTION_ROLLEDBACK e4)
      {
                RollbackException rollbackException = new RollbackException(e4.toString());
                rollbackException.initCause(e4);
                throw rollbackException;
      }
      catch (org.omg.CORBA.NO_PERMISSION e5)
      {
        throw new SecurityException(e5);
View Full Code Here

                _theTransaction.registerSynchronization(synchronizationImple.getSynchronization());
      }
      catch (TRANSACTION_ROLLEDBACK e2)
      {
                RollbackException rollbackException = new javax.transaction.RollbackException(e2.toString());
                rollbackException.initCause(e2);
                throw rollbackException;
      }
      catch (org.omg.CosTransactions.Inactive e3)
      {
        throw new IllegalStateException(
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

                            // 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());
            }
            throw rollbackException;
          default:
            throw new InvalidTerminationStateException(
                jtaLogger.logMesg.getString("com.arjuna.ats.internal.jta.transaction.arjunacore.invalidstate"));
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

                        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

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.