case XAException.XA_HEURRB: HeuristicRollbackException hrex = new HeuristicRollbackException(); hrex.initCause(xaex); throw hrex; case XAException.XA_HEURMIX:
statusRef.set(Status.STATUS_UNKNOWN); final HeuristicRollbackException e = Log.log.peerHeuristicRollbackException(); e.initCause(RemoteExceptionCause.readFromStream(is)); throw e; } else if (id == Protocol.P_UT_IS_EXC) {
protected void invokeCompensableCommitIfLocalTransaction(CompensableTransaction compensable) throws HeuristicRollbackException, SystemException { TransactionParticipant transactionCoordinator = this.beanFactory.getTransactionNativeParticipant(); Transaction transaction = compensable.getTransaction(); org.bytesoft.transaction.TransactionContext transactionContext = transaction.getTransactionContext(); TransactionXid transactionXid = transactionContext.getXid(); try { transactionCoordinator.end(transactionContext, XAResource.TMSUCCESS); transactionCoordinator.commit(transactionXid, true); } catch (XAException xaex) { switch (xaex.errorCode) { case XAException.XA_HEURCOM: transactionCoordinator.forgetQuietly(transactionXid); break; case XAException.XA_HEURRB: transactionCoordinator.forgetQuietly(transactionXid); HeuristicRollbackException hrex = new HeuristicRollbackException(); hrex.initCause(xaex); throw hrex; default: transactionCoordinator.forgetQuietly(transactionXid); // TODO SystemException sysEx = new SystemException(xaex.errorCode); sysEx.initCause(xaex); throw sysEx; } } }
transactionCoordinator.forgetQuietly(transactionXid); HeuristicRollbackException hrex = new HeuristicRollbackException(); hrex.initCause(xaEx); throw hrex; case XAException.XA_HEURMIX:
private static void rethrowAsJtaHeuristicRollbackException(String msg, Throwable cause) throws javax.transaction.HeuristicRollbackException { javax.transaction.HeuristicRollbackException ret = new javax.transaction.HeuristicRollbackException( msg); ret.initCause(cause); throw ret; }
this.participantRollback(); HeuristicRollbackException hrex = new HeuristicRollbackException(); hrex.initCause(rrex); throw hrex; } catch (SystemException ex) { this.participantRollback(); HeuristicRollbackException hrex = new HeuristicRollbackException(); hrex.initCause(ex); throw hrex; } catch (RuntimeException rex) { this.participantRollback(); HeuristicRollbackException hrex = new HeuristicRollbackException(); hrex.initCause(rex); throw hrex;
this.participantRollback(); HeuristicRollbackException hrex = new HeuristicRollbackException(); hrex.initCause(rrex); throw hrex; } catch (SystemException ex) { this.participantRollback(); HeuristicRollbackException hrex = new HeuristicRollbackException(); hrex.initCause(ex); throw hrex; } catch (RuntimeException rex) { this.participantRollback(); HeuristicRollbackException hrex = new HeuristicRollbackException(); hrex.initCause(rex); throw hrex;
this.participantRollback(); HeuristicRollbackException hrex = new HeuristicRollbackException(); hrex.initCause(rrex); throw hrex; } catch (SystemException ex) { this.participantRollback(); HeuristicRollbackException hrex = new HeuristicRollbackException(); hrex.initCause(ex); throw hrex; } catch (RuntimeException rex) { this.participantRollback(); HeuristicRollbackException hrex = new HeuristicRollbackException(); hrex.initCause(rex); throw hrex; } finally {
this.participantRollback(); HeuristicRollbackException hrex = new HeuristicRollbackException(); hrex.initCause(rrex); throw hrex; } catch (SystemException ex) { this.participantRollback(); HeuristicRollbackException hrex = new HeuristicRollbackException(); hrex.initCause(ex); throw hrex; } catch (RuntimeException rex) { this.participantRollback(); HeuristicRollbackException hrex = new HeuristicRollbackException(); hrex.initCause(rex); throw hrex; } finally {
this.fireRollback(); HeuristicRollbackException hrex = new HeuristicRollbackException(); hrex.initCause(rrex); throw hrex; } catch (SystemException ex) { this.fireRollback(); HeuristicRollbackException hrex = new HeuristicRollbackException(); hrex.initCause(ex); throw hrex; } catch (RuntimeException rex) { this.fireRollback(); HeuristicRollbackException hrex = new HeuristicRollbackException(); hrex.initCause(rex); throw hrex;
this.fireRollback(); HeuristicRollbackException hrex = new HeuristicRollbackException(); hrex.initCause(rrex); throw hrex; } catch (SystemException ex) { this.fireRollback(); HeuristicRollbackException hrex = new HeuristicRollbackException(); hrex.initCause(ex); throw hrex; } catch (RuntimeException rex) { this.fireRollback(); HeuristicRollbackException hrex = new HeuristicRollbackException(); hrex.initCause(rex); throw hrex;
case XAException.XA_HEURRB: HeuristicRollbackException hrex = new HeuristicRollbackException(); hrex.initCause(xaex); throw hrex; case XAException.XA_HEURMIX:
this.participantRollback(); HeuristicRollbackException hrex = new HeuristicRollbackException(); hrex.initCause(rrex); throw hrex; } catch (SystemException ex) { this.participantRollback(); HeuristicRollbackException hrex = new HeuristicRollbackException(); hrex.initCause(ex); throw hrex; } catch (RuntimeException rex) { this.participantRollback(); HeuristicRollbackException hrex = new HeuristicRollbackException(); hrex.initCause(rex); throw hrex; } finally {
this.participantRollback(); HeuristicRollbackException hrex = new HeuristicRollbackException(); hrex.initCause(rrex); throw hrex; } catch (SystemException ex) { this.participantRollback(); HeuristicRollbackException hrex = new HeuristicRollbackException(); hrex.initCause(ex); throw hrex; } catch (RuntimeException rex) { this.participantRollback(); HeuristicRollbackException hrex = new HeuristicRollbackException(); hrex.initCause(rex); throw hrex; } finally {
this.transactionListenerList.onCommitHeuristicRolledback(xid); HeuristicRollbackException hrex = new HeuristicRollbackException(); hrex.initCause(xaex); throw hrex; default:
this.transactionListenerList.onCommitHeuristicRolledback(xid); HeuristicRollbackException hrex = new HeuristicRollbackException(); hrex.initCause(xaex); throw hrex; default:
this.transactionListenerList.onCommitHeuristicRolledback(xid); HeuristicRollbackException hrex = new HeuristicRollbackException(); hrex.initCause(xaex); throw hrex; default:
private void commitResources(List<TransactionBranch> rms) throws HeuristicRollbackException, HeuristicMixedException, SystemException { CommitTask commitTask = new CommitTask(xid, rms, logMark, txManager); synchronized (this) { status = Status.STATUS_COMMITTING; } commitTask.run(); synchronized (this) { status = commitTask.getStatus(); } XAException cause = commitTask.getCause(); boolean evercommit = commitTask.isEvercommit(); if (cause != null) { if (cause.errorCode == XAException.XA_HEURRB && !evercommit) { throw (HeuristicRollbackException) new HeuristicRollbackException("Error during two phase commit").initCause(cause); } else if (cause.errorCode == XAException.XA_HEURRB && evercommit) { throw (HeuristicMixedException) new HeuristicMixedException("Error during two phase commit").initCause(cause); } else if (cause.errorCode == XAException.XA_HEURMIX) { throw (HeuristicMixedException) new HeuristicMixedException("Error during two phase commit").initCause(cause); } else { throw (SystemException) new SystemException("Error during two phase commit").initCause(cause); } } }
protected void invokeCompensableCommitIfLocalTransaction(CompensableTransaction compensable) throws HeuristicRollbackException, SystemException { RemoteCoordinator transactionCoordinator = this.beanFactory.getTransactionCoordinator(); Transaction transaction = compensable.getTransaction(); org.bytesoft.transaction.TransactionContext transactionContext = transaction.getTransactionContext(); TransactionXid transactionXid = transactionContext.getXid(); try { transactionCoordinator.end(transactionContext, XAResource.TMSUCCESS); transactionCoordinator.commit(transactionXid, true); } catch (XAException xaex) { switch (xaex.errorCode) { case XAException.XA_HEURCOM: transactionCoordinator.forgetQuietly(transactionXid); break; case XAException.XA_HEURRB: transactionCoordinator.forgetQuietly(transactionXid); HeuristicRollbackException hrex = new HeuristicRollbackException(); hrex.initCause(xaex); throw hrex; default: transactionCoordinator.forgetQuietly(transactionXid); // TODO SystemException sysEx = new SystemException(); sysEx.initCause(xaex); throw sysEx; } } }
transactionCoordinator.forgetQuietly(transactionXid); HeuristicRollbackException hrex = new HeuristicRollbackException(); hrex.initCause(xaEx); throw hrex; case XAException.XA_HEURMIX: