Package org.omg.CosTransactions

Examples of org.omg.CosTransactions.Status


        }
        current_transaction_locks.lock( mode );
        return true;
    };
    private void check_status( TransactionCoordinator tc ){
        Status status = tc.get_state();
        if( status.equals( Status.StatusActive ) ){
            return;
        } else if( status.equals( Status.StatusPrepared )      ||
                   status.equals( Status.StatusCommitted )     ||
                   status.equals( Status.StatusUnknown )       ||
                   status.equals( Status.StatusNoTransaction ) ||
                   status.equals( Status.StatusPreparing )     ||
                   status.equals( Status.StatusCommitting ) )  {
            throw new org.omg.CORBA.INVALID_TRANSACTION();
        } else if (status.equals( Status.StatusRollingBack )   ||
                   status.equals( Status.StatusMarkedRollback) ||
                   status.equals( Status.StatusRolledBack) )   {
            throw new org.omg.CORBA.TRANSACTION_ROLLEDBACK();
        }
    }
View Full Code Here


    private LockSetFactoryImpl factory;
    TransactionCoordinator( LockSetFactoryImpl factory, Coordinator current, POA poa ) {
        this.current = current;
        this.poa = poa;
        this.factory = factory;
        Status status = current.get_status();
        if( status.equals( Status.StatusActive ) ){
            state = ACTIVE;
        } else if( status.equals( Status.StatusPrepared )      ||
                   status.equals( Status.StatusPreparing ) ) {
            state = PREPARED;
        } else if ( status.equals( Status.StatusCommitted )     ||
                   status.equals( Status.StatusUnknown )       ||
                   status.equals( Status.StatusNoTransaction ) ||
                   status.equals( Status.StatusCommitting ) )  {
            state = COMMITED;
        } else if (status.equals( Status.StatusRollingBack )   ||
                   status.equals( Status.StatusMarkedRollback) ||
                   status.equals( Status.StatusRolledBack) )   {
            state = ROLLEDBACK;
        }
    };
View Full Code Here

     *    the current thread, this method returns the Status.NoTransaction
     *    value.
     */
    public int getStatus() throws SystemException {
        try {
            Status status = current.get_status();
            return mapStatus(status);
        } catch (Exception ex) {
            throw new SystemException(ex.toString());
        }
    }
View Full Code Here

        }
    }

    public int getStatus() throws SystemException {
        // XXX what should getStatus return on exception?
        Status  status;
        try {
            if (Configuration.isLocalFactory()) {
              status = ((ControlImpl) control).get_localCoordinator().get_status();
            } else {
              status = control.get_coordinator().get_status();
View Full Code Here

     *    the current thread, this method returns the Status.NoTransaction
     *    value.
     */
    public int getStatus() throws SystemException {
        try {
            Status status = current.get_status();
            return mapStatus(status);
        } catch (Exception ex) {
            throw new SystemException(ex.toString());
        }
    }
View Full Code Here

     *    the current thread, this method returns the Status.NoTransaction
     *    value.
     */
    public int getStatus() throws SystemException {
        try {
            Status status = current.get_status();
            return mapStatus(status);
        } catch (Exception ex) {
            throw new SystemException(ex.toString());
        }
    }
View Full Code Here

        }
    }

    public int getStatus() throws SystemException {
        // XXX what should getStatus return on exception?
        Status  status;
        try {
            if (Configuration.isLocalFactory()) {
              status = ((ControlImpl) control).get_localCoordinator().get_status();
            } else {
              status = control.get_coordinator().get_status();
View Full Code Here

        }
    }

    public int getStatus() throws SystemException {
        // XXX what should getStatus return on exception?
        Status  status;
        try {
            if (Configuration.isLocalFactory()) {
              status = ((ControlImpl) control).get_localCoordinator().get_status();
            } else {
              status = control.get_coordinator().get_status();
View Full Code Here

     *    the current thread, this method returns the Status.NoTransaction
     *    value.
     */
    public int getStatus() throws SystemException {
        try {
            Status status = current.get_status();
            return mapStatus(status);
        } catch (Exception ex) {
            throw new SystemException(ex.toString());
        }
    }
View Full Code Here

/*  28 */       InputStream _is = null;
/*     */       try
/*     */       {
/*  31 */         OutputStream _os = _request("get_top_level_status", true);
/*  32 */         _is = _invoke(_os);
/*  33 */         Status _result = StatusHelper.read(_is);
/*  34 */         Status localStatus1 = _result;
/*     */         return localStatus1;
/*     */       }
/*     */       catch (RemarshalException _rx)
/*     */       {
/*     */       }
/*     */       catch (ApplicationException _ax)
/*     */       {
/*  39 */         String _id = _ax.getId();
/*  40 */         throw new RuntimeException("Unexpected exception " + _id);
/*     */       }
/*     */       finally
/*     */       {
/*  44 */         _releaseReply(_is);
/*     */       }
/*     */
/*     */     }
/*     */
/*  49 */     ServantObject _so = _servant_preinvoke("get_top_level_status", _opsClass);
/*  50 */     if (_so == null)
/*  51 */       throw new UNKNOWN("local invocations not supported!"); CoordinatorExtOperations _localServant = (CoordinatorExtOperations)_so.servant;
/*     */     Status _result;
/*     */     try {
/*  56 */       _result = _localServant.get_top_level_status();
/*     */     }
/*     */     finally
/*     */     {
View Full Code Here

TOP

Related Classes of org.omg.CosTransactions.Status

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.