Package com.arjuna.ats.internal.jts.orbspecific.interposition.coordinator

Examples of com.arjuna.ats.internal.jts.orbspecific.interposition.coordinator.ServerTransaction


   * @throws SystemException
   */
 
  public int doRollback () throws SystemException
  {
    ServerTransaction stx = getTransaction();
   
    try
   
      if (stx != null)
        return stx.doPhase2Abort();
    }
    catch (Exception ex)
    {
    }
     
View Full Code Here


    // TODO error
  }
 
  public void doForget () throws SystemException
  {
    ServerTransaction stx = getTransaction();
   
    try
   
      if (stx != null)
        stx.doForget();
    }
    catch (Exception ex)
    {
    }
  }
View Full Code Here

      super.duplicateTransactionHandle(coord, term);
    }
    else
    {
      _transactionHandle = new ServerTransaction(actUid, _parentControl,
          parentTran);
      _isWrapper = false;

      super.createTransactionHandle();
View Full Code Here

  {
      destroyResource();
      return;
  }
   
  ServerTransaction theTransaction = (ServerTransaction) _theControl.getImplHandle();
 
  //  ThreadActionData.pushAction(theTransaction);
   
  /*
   * Do nothing about propagation since we should already be
   * registered with the parent, i.e., ignore the parent
   * parameter.
   */

  /*
   * We should not get exceptions here.
   */
 
  try
  {
      theTransaction.commit(false);
  }
  catch (TRANSACTION_ROLLEDBACK e1)
  {
      if (jtsLogger.loggerI18N.isWarnEnabled())
      {
View Full Code Here

  {
      destroyResource();
      return;
  }

  ServerTransaction theTransaction = (ServerTransaction) _theControl.getImplHandle();
 
  //  ThreadActionData.pushAction(theTransaction);

  try
  {
      if (!valid())
    theTransaction.doPhase2Abort();
      else
    theTransaction.rollback();
  }
  catch (SystemException e)
  {
      throw e;
  }
View Full Code Here

  {
      destroyResource()// won't necessarily get another invocation!
      return Vote.VoteReadOnly;
  }

  ServerTransaction theTransaction = (ServerTransaction) _theControl.getImplHandle();
 
  //  ThreadActionData.pushAction(theTransaction); // unnecessary if context goes with all calls.

  int result = TwoPhaseOutcome.PREPARE_NOTOK;

  /*
   * Transaction may have locally timed out and been rolled back.
   */

  int s = theTransaction.status();

  if ((s == ActionStatus.RUNNING) || (s == ActionStatus.ABORT_ONLY))
      result = theTransaction.doPrepare();
  else
  {
      switch (s)
      {
      case ActionStatus.COMMITTING:
View Full Code Here

  {
      destroyResource();
      return;
  }
 
  ServerTransaction theTransaction = (ServerTransaction) _theControl.getImplHandle();
 
  //  ThreadActionData.pushAction(theTransaction);

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

      actionStatus = theTransaction.doPhase2Abort();
  }
  else
  {
      if ((actionStatus == ActionStatus.RUNNING) ||
                (actionStatus == ActionStatus.ABORT_ONLY))
      {
    try
    {
        /*
         * Have to do this because of the way PI works
         * with thread-context association.
         */

        if (!valid())
      theTransaction.doPhase2Abort()// must rollback
        else
      theTransaction.rollback();

        actionStatus = ActionStatus.ABORTED;
    }
    catch (SystemException ex)
    {
View Full Code Here

  {
      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(false);
  }
  else
  {
      if (actionStatus == ActionStatus.RUNNING)
      {
View Full Code Here

  {
      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
  {
      /*
       * This will commit and do any before/after_completion calls
       * on registered synchronizations.
       */

      theTransaction.doCommit(true);
  }
  catch (HeuristicHazard e1)
  {
      /*
       * Is a heuristic, then don't remove the
View Full Code Here

   
    RecoveryCoordinator recoveryCoord = theCoordinator.register_resource(_resourceRef);

    if (!_theControl.isWrapper())
    {
        ServerTransaction tx = (ServerTransaction) _theControl.getImplHandle();

        if (tx != null)
        {
      tx.setRecoveryCoordinator(recoveryCoord);

      result = true;
        }
        else
      result = false;
View Full Code Here

TOP

Related Classes of com.arjuna.ats.internal.jts.orbspecific.interposition.coordinator.ServerTransaction

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.