Package org.omg.CosTransactions

Examples of org.omg.CosTransactions.Inactive


        synchronized(stat_semaphore){
            if (status == Status._StatusMarkedRollback){
                throw new org.omg.CORBA.TRANSACTION_ROLLEDBACK();
            }
            if (status != Status._StatusActive){
                throw new Inactive();
            }
            resources.addElement(r);
            votes.addElement(null);
        }
        return null;
View Full Code Here


        synchronized(stat_semaphore){
            if (status == Status._StatusMarkedRollback){
                throw new org.omg.CORBA.TRANSACTION_ROLLEDBACK();
            }
            if (status != Status._StatusActive){
                throw new Inactive();
            }
            syncs.addElement(sync);
        }
    }
View Full Code Here

        throw new org.omg.CORBA.NO_IMPLEMENT();
    }

    public void rollback_only() throws Inactive{
        if (!move_to_state(Status._StatusMarkedRollback)){
            throw new Inactive();
        }
    }
View Full Code Here

  return getStatus(transactionUid, item, checkTheObjectStore);
    }
    else
    {
  // null item implies long-dead process
  throw new Inactive();
    }
}
View Full Code Here

      item.markAsDead();

      // use Inactive as an indication that the parent process
      // has gone
     
      throw new Inactive();
  }
  else
  {
      return otsStatus;
  }
    }
    else
    {
  // factory in item is null - process already dead
  if (jtsLogger.loggerI18N.isDebugEnabled())
  {
      jtsLogger.loggerI18N.debug(DebugLevel.FUNCTIONS, VisibilityLevel.VIS_PUBLIC,
               FacilityCode.FAC_CRASH_RECOVERY,
               "com.arjuna.ats.internal.jts.recovery.contact.StatusChecker_13",
               new Object[]{transactionUid});
  }

  /*
   * In which case we can use the current, in process local factory, to
   * look at the object store and get the status from that. At present
   * all factories can look at the entire object store on a machine, so
   * this will work. If a factory is limited to only a portion of the object
   * store then we may need to create an explicit factory that has "global"
   * knowledge.
   */

        if ( checkTheObjectStore )
        {
            try
            {
    Status s = OTSManager.factory().getStatus(transactionUid);

    /*
     * If the status is committing or rolling back from a dead
     * (local) process then we can direct recovery now.
     */

    if (s == Status.StatusCommitting)
        return Status.StatusCommitted;
    else
    {
        if (s == Status.StatusRollingBack)
      return Status.StatusRolledBack;
    }

    return s;
            }
            catch (NoTransaction e1)
            {
                return Status.StatusNoTransaction;
            }
            catch (SystemException e2)
            {
                return Status.StatusUnknown;
            }
        }
        else
        {
            throw new Inactive();
        }
    }
}
View Full Code Here

  return getStatus(transactionUid, item, checkTheObjectStore);
    }
    else
    {
  // null item implies long-dead process
  throw new Inactive();
    }
}
View Full Code Here

      item.markAsDead();

      // use Inactive as an indication that the parent process
      // has gone

      throw new Inactive();
  }
  else
  {
      return otsStatus;
  }
    }
    else
    {
  // factory in item is null - process already dead
  if (jtsLogger.loggerI18N.isDebugEnabled())
  {
      jtsLogger.loggerI18N.debug(DebugLevel.FUNCTIONS, VisibilityLevel.VIS_PUBLIC,
               FacilityCode.FAC_CRASH_RECOVERY,
               "com.arjuna.ats.internal.jts.recovery.contact.StatusChecker_13",
               new Object[]{transactionUid});
  }

  /*
   * In which case we can use the current, in process local factory, to
   * look at the object store and get the status from that. At present
   * all factories can look at the entire object store on a machine, so
   * this will work. If a factory is limited to only a portion of the object
   * store then we may need to create an explicit factory that has "global"
   * knowledge.
   */

        if ( checkTheObjectStore )
        {
            try
            {
    Status s = OTSManager.factory().getStatus(transactionUid);

    /*
     * If the status is committing or rolling back from a dead
     * (local) process then we can direct recovery now.
     */

    if (s == Status.StatusCommitting)
        return Status.StatusCommitted;
    else
    {
        if (s == Status.StatusRollingBack)
      return Status.StatusRolledBack;
    }

    return s;
            }
            catch (NoTransaction e1)
            {
                return Status.StatusNoTransaction;
            }
            catch (SystemException e2)
            {
                return Status.StatusUnknown;
            }
        }
        else
        {
            throw new Inactive();
        }
    }
}
View Full Code Here

        synchronized(stat_semaphore){
            if (status == Status._StatusMarkedRollback){
                throw new org.omg.CORBA.TRANSACTION_ROLLEDBACK();
            }
            if (status != Status._StatusActive){
                throw new Inactive();
            }
            resources.addElement(r);
            votes.addElement(null);
        }
        return null;
View Full Code Here

        synchronized(stat_semaphore){
            if (status == Status._StatusMarkedRollback){
                throw new org.omg.CORBA.TRANSACTION_ROLLEDBACK();
            }
            if (status != Status._StatusActive){
                throw new Inactive();
            }
            syncs.addElement(sync);
        }
    }
View Full Code Here

        throw new org.omg.CORBA.NO_IMPLEMENT();
    }

    public void rollback_only() throws Inactive{
        if (!move_to_state(Status._StatusMarkedRollback)){
            throw new Inactive();
        }
    }
View Full Code Here

TOP

Related Classes of org.omg.CosTransactions.Inactive

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.