Package org.omg.CORBA

Examples of org.omg.CORBA.INVALID_TRANSACTION


      /*
       * Differentiate between us ending the transaction and some other
       * thread doing it.
       */

      throw new INVALID_TRANSACTION(0, CompletionStatus.COMPLETED_NO); // means
                                       // transaction
                                       // already
                                       // terminated.
    }

    switch (status)
    {
    case ActionStatus.ABORTING:
    case ActionStatus.ABORTED:
    case ActionStatus.H_ROLLBACK:
      /*
       * If the transaction has already rolledback then silently ignore
       * the multiple rollback attempts.
       */
      return;
    case ActionStatus.PREPARING: // shouldn't be able to get heuristics or
                   // any of these!
    case ActionStatus.PREPARED:
    case ActionStatus.COMMITTING:
    case ActionStatus.COMMITTED:
    case ActionStatus.H_COMMIT:
    case ActionStatus.H_MIXED:
    case ActionStatus.H_HAZARD:
      throw new INVALID_TRANSACTION(0, CompletionStatus.COMPLETED_NO); // means
                                       // transaction
                                       // already
                                       // terminated.
    case ActionStatus.INVALID:
    case ActionStatus.CLEANUP:
View Full Code Here


/* 466 */     if ((e instanceof TransactionRequiredException))
/* 467 */       throw new TRANSACTION_REQUIRED(e.toString());
/* 468 */     if ((e instanceof TransactionRolledbackException))
/* 469 */       throw new TRANSACTION_ROLLEDBACK(e.toString());
/* 470 */     if ((e instanceof InvalidTransactionException))
/* 471 */       throw new INVALID_TRANSACTION(e.toString());
/*     */   }
View Full Code Here

            } catch (TransactionRequiredException e) {
                log.debug("TransactionRequiredException", e);
                throw new TRANSACTION_REQUIRED(e.toString()).initCause(e);
            } catch (InvalidTransactionException e) {
                log.debug("InvalidTransactionException", e);
                throw new INVALID_TRANSACTION(e.toString()).initCause(e);
            } catch (NoSuchObjectException e) {
                log.debug("NoSuchObjectException", e);
                throw new OBJECT_NOT_EXIST(e.toString()).initCause(e);
            } catch (AccessException e) {
                log.debug("AccessException", e);
View Full Code Here

    public void importTransaction(PropagationContext propagationContext) {
        if (propagationContext == null) {
            throw new TRANSACTION_REQUIRED("Transaction required");
        }
        throw new INVALID_TRANSACTION("Transaction cannot be imported");
    }
View Full Code Here

public class NotRequired implements OperationTxPolicy, Serializable {
    public static final OperationTxPolicy INSTANCE = new NotRequired();

    public void importTransaction(PropagationContext propagationContext) {
        if (propagationContext != null) {
            throw new INVALID_TRANSACTION("Transactions cannot be imported, and might also be not allowed for this method");
        }
    }
View Full Code Here

            } catch (TransactionRequiredException e) {
                log.debug("TransactionRequiredException", e);
                throw (SystemException)new TRANSACTION_REQUIRED(e.toString()).initCause(e);
            } catch (InvalidTransactionException e) {
                log.debug("InvalidTransactionException", e);
                throw (SystemException)new INVALID_TRANSACTION(e.toString()).initCause(e);
            } catch (NoSuchObjectException e) {
                log.debug("NoSuchObjectException", e);
                throw (SystemException)new OBJECT_NOT_EXIST(e.toString()).initCause(e);
            } catch (AccessException e) {
                log.debug("AccessException", e);
View Full Code Here

                 com.arjuna.ats.jts.logging.FacilityCode.FAC_OTS, "ServerTopLevelAction::commit for "+_theUid);
  }

  if (_theControl == null)
  {
      throw new INVALID_TRANSACTION(ExceptionCodes.SERVERAA_NO_CONTROL, CompletionStatus.COMPLETED_NO);
  }

  if (_theControl.isWrapper())
  {
      destroyResource();
      return;
  }

  ServerTransaction theTransaction = (ServerTransaction) _theControl.getImplHandle();

  //  ThreadActionData.pushAction(theTransaction);

  int actionStatus = theTransaction.status();
  boolean notPrepared = false;

  if (actionStatus == ActionStatus.PREPARED)
  {
      /*
       * This will also call any after_completions on
       * registered synchronizations.
       */

      actionStatus = theTransaction.doPhase2Commit();
  }
  else
  {
      if (actionStatus == ActionStatus.RUNNING)
      {
    if (jtsLogger.logger.isDebugEnabled())
    {
        jtsLogger.logger.debug(DebugLevel.FUNCTIONS, VisibilityLevel.VIS_PUBLIC,
                   com.arjuna.ats.jts.logging.FacilityCode.FAC_OTS, "ServerTopLevelAction::commit for "+_theUid+" : NotPrepared");
    }

    notPrepared = true;
      }
  }

  ThreadActionData.popAction();

  if (notPrepared)
      throw new NotPrepared();

  if (jtsLogger.logger.isDebugEnabled())
  {
      jtsLogger.logger.debug(DebugLevel.FUNCTIONS, VisibilityLevel.VIS_PUBLIC,
           com.arjuna.ats.jts.logging.FacilityCode.FAC_OTS, "ServerTopLevelAction::commit for "+_theUid+" : "+ActionStatus.stringForm(actionStatus));
  }

  switch (actionStatus)
  {
  case ActionStatus.PREPARED:
      throw new INVALID_TRANSACTION(ExceptionCodes.SERVERAA_NO_CONTROL, CompletionStatus.COMPLETED_NO);
  case ActionStatus.COMMITTED:
  case ActionStatus.H_COMMIT:
      destroyResource();
      break;
  case ActionStatus.ABORTED:
View Full Code Here

                 com.arjuna.ats.jts.logging.FacilityCode.FAC_OTS, "ServerTopLevelAction::commit_one_phase for "+_theUid);
  }

  if (_theControl == null)
  {
      throw new INVALID_TRANSACTION(ExceptionCodes.SERVERAA_NO_CONTROL, CompletionStatus.COMPLETED_NO);
  }

  if (_theControl.isWrapper())
  {
      destroyResource();
      return;
  }

  ServerTransaction theTransaction = (ServerTransaction) _theControl.getImplHandle();

  if (theTransaction == null)
  {
      if (jtsLogger.loggerI18N.isWarnEnabled())
      {
    jtsLogger.loggerI18N.warn("com.arjuna.ats.internal.jts.orbspecific.interposition.resources.arjuna.notx",
            new Object[] {"ServerTopLevelAction.commit_one_phase"});
      }

      throw new INVALID_TRANSACTION(ExceptionCodes.NO_TRANSACTION, CompletionStatus.COMPLETED_NO);
  }

  //  ThreadActionData.pushAction(theTransaction);

  try
View Full Code Here

       */

      if (parentTransaction != null)
        parentTransaction.removeChildAction(this);

      throw new INVALID_TRANSACTION(ExceptionCodes.INVALID_ACTION,
          CompletionStatus.COMPLETED_NO);
    }

    /*
     * Now do after completion stuff.
View Full Code Here

      if (jtsLogger.logger.isDebugEnabled())
      {
        jtsLogger.logger.debug(DebugLevel.FUNCTIONS, VisibilityLevel.VIS_PUBLIC, com.arjuna.ats.jts.logging.FacilityCode.FAC_OTS, "ControlWrapper::create_subtransaction - subtransaction parent is inactive.");
      }

      throw new INVALID_TRANSACTION(
          ExceptionCodes.UNAVAILABLE_COORDINATOR,
          CompletionStatus.COMPLETED_NO);
    }
  }
View Full Code Here

TOP

Related Classes of org.omg.CORBA.INVALID_TRANSACTION

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.