Examples of BAD_PARAM


Examples of org.omg.CORBA.BAD_PARAM

        compareUid = null;

        ptr = null;
      }
      else
        throw new BAD_PARAM();
    }
    catch (SystemException e)
    {
      /*
       * Narrow failed, so can't be an Arjuna Uid. Therefore, the answer
View Full Code Here

Examples of org.omg.CORBA.BAD_PARAM

        compareTLUid = null;

        ptr = null;
      }
      else
        throw new BAD_PARAM();
    }
    catch (SystemException e)
    {
      /*
       * Narrow failed, so can't be an Arjuna Uid. Therefore, the answer
View Full Code Here

Examples of org.omg.CORBA.BAD_PARAM

        }

        ptr = null;
      }
      else
        throw new BAD_PARAM();
    }
    catch (SystemException e)
    {
      /*
       * Narrow failed, so can't be an Arjuna Uid. Therefore, the answer
View Full Code Here

Examples of org.omg.CORBA.BAD_PARAM

      jtsLogger.logger.debug(DebugLevel.FUNCTIONS, VisibilityLevel.VIS_PUBLIC, com.arjuna.ats.jts.logging.FacilityCode.FAC_OTS, "ArjunaTransactionImple::register_resource ( "
          + r + " ) - called for " + get_uid());
    }

    if (r == null)
      throw new BAD_PARAM(0, CompletionStatus.COMPLETED_NO);

    currentStatus = determineStatus(this);

    if (currentStatus != Status.StatusActive)
    {
      if (jtsLogger.logger.isDebugEnabled())
      {
        jtsLogger.logger.debug(DebugLevel.FUNCTIONS, VisibilityLevel.VIS_PUBLIC, com.arjuna.ats.jts.logging.FacilityCode.FAC_OTS, "ArjunaTransactionImple::register_resource - transaction not active: "
            + Utility.stringStatus(currentStatus));
      }

      if (currentStatus == Status.StatusMarkedRollback)
      {
        throw new TRANSACTION_ROLLEDBACK(
            ExceptionCodes.MARKED_ROLLEDBACK,
            CompletionStatus.COMPLETED_NO);
      }
      else
        throw new Inactive();
    }

    AbstractRecord corbaRec = null;
    BasicAction registerIn = this;

    if (jtsLogger.logger.isDebugEnabled())
    {
      jtsLogger.logger.debug(DebugLevel.FUNCTIONS, VisibilityLevel.VIS_PUBLIC, com.arjuna.ats.jts.logging.FacilityCode.FAC_OTS, "ArjunaTransactionImple "
          + get_uid() + " ::register_resource: ");
    }

    //
    // Creation of recovery coordinator (DBI)
    //

    //
    // Pack the params:
    // [0] = Transaction* this
    //

    int index = 0;
    Object params[] = new Object[10];
    params[index++] = this;

    RecoveryCoordinator recoveryCoordinator = null;
    Uid recoveryCoordinatorUid = null;

    /*
     * A RecoveryCoordinator can be null but only if the implementation
     * throws NO_IMPLEMENT. If it tries to return null then that is
     * considered an error and we will roll back the transaction.
     */

    try
    {
      recoveryCoordinator = RecoveryCreator.createRecoveryCoordinator(r, params);

      if (recoveryCoordinator == null)
        throw new BAD_OPERATION(
            "RecoveryCoordinator "
                + jtsLogger.logMesg.getString("com.arjuna.ats.internal.jts.orbspecific.coordinator.rcnotcreated"));
    }
    catch (NO_IMPLEMENT ex)
    {
      /*
       * This is legal, and is meant to show that this ORB or
       * configuration simply doesn't support crash recovery.
       */

      recoveryCoordinator = null;
    }
    catch (SystemException e)
    {
      if (jtsLogger.loggerI18N.isWarnEnabled())
      {
        jtsLogger.loggerI18N.warn("com.arjuna.ats.internal.jts.orbspecific.coordinator.rccreate", new Object[]
        { get_uid(), e });
      }

      /*
       * Set transaction to rollback only and re-throw exception.
       */

      try
      {
        rollback_only();
      }
      catch (Inactive ex1)
      {
      }
      catch (SystemException ex2)
      {
        if (jtsLogger.loggerI18N.isWarnEnabled())
        {
          jtsLogger.loggerI18N.warn("com.arjuna.ats.internal.jts.orbspecific.coordinator.rbofail", new Object[]
          { "ArjunaTransactionImple.register_resource", get_uid(), ex2 });
        }

        throw ex2;
      }

      throw e;
    }

    if (recoveryCoordinator != null)
    {
      //
      // We got a RecoveryCoordinator, so unpack the other return values:
      // [0] = RecoveryCoordinator Uid*
      //

      index = 0;
      recoveryCoordinatorUid = (Uid) params[index++];
    }
    else
    {
      //
      // We didn't get a RecoveryCoordinator, so we don't assume that
      // the other return values have been populated.
      //

      recoveryCoordinatorUid = Uid.nullUid();
    }

    try
    {
      SubtransactionAwareResource staResource = org.omg.CosTransactions.SubtransactionAwareResourceHelper.narrow(r);

      /*
       * Some Orbs (e.g., Orbix) throw BAD_PARAM is the object in X.narrow
       * is not of type X, whereas others (e.g., OrbPlus) simply return
       * NULL!
       */

      if (staResource != null)
      {
        if (jtsLogger.logger.isDebugEnabled())
        {
          jtsLogger.logger.debug(DebugLevel.FUNCTIONS, VisibilityLevel.VIS_PUBLIC, com.arjuna.ats.jts.logging.FacilityCode.FAC_OTS, "ArjunaTransactionImple::register_resource for "
              + get_uid()
              + " - subtransaction aware resource: YES");
        }

        /*
         * If here the narrow was ok so we have a subtran aware
         * resource.
         */

        Coordinator coord = null;

        if (parentHandle != null)
        {
          /*
           * If we are a SubTranResource then we get registered with
           * the current transaction and its parents upon completion.
           * The first parameter to the record indicates whether we
           * should be propagated (registered) with the parent
           * transaction.
           */

          coord = parentHandle.get_coordinator();
        }

        corbaRec = createOTSRecord(true, r, coord, recoveryCoordinatorUid);

        coord = null;
        staResource = null;
      }
      else
        throw new BAD_PARAM(0, CompletionStatus.COMPLETED_NO);
    }
    catch (BAD_PARAM ex)
    {
      if (jtsLogger.logger.isDebugEnabled())
      {
View Full Code Here

Examples of org.omg.CORBA.BAD_PARAM

      jtsLogger.logger.debug(DebugLevel.FUNCTIONS, VisibilityLevel.VIS_PUBLIC, com.arjuna.ats.jts.logging.FacilityCode.FAC_OTS, "ArjunaTransactionImple::register_subtran_aware called for "
          + get_uid());
    }

    if (r == null)
      throw new BAD_PARAM(0, CompletionStatus.COMPLETED_NO);

    currentStatus = determineStatus(this);

    if (currentStatus != Status.StatusActive)
    {
View Full Code Here

Examples of org.omg.CORBA.BAD_PARAM

      jtsLogger.logger.debug(DebugLevel.FUNCTIONS, VisibilityLevel.VIS_PUBLIC, com.arjuna.ats.jts.logging.FacilityCode.FAC_OTS, "ArjunaTransactionImple::register_synchronization - called for "
          + get_uid());
    }

    if (sync == null)
      throw new BAD_PARAM(0, CompletionStatus.COMPLETED_NO);

    if (!is_top_level_transaction()) // are we a top-level transaction?
    {
      if (jtsLogger.logger.isDebugEnabled())
      {
View Full Code Here

Examples of org.omg.CORBA.BAD_PARAM

      try
      {
        absRec = com.arjuna.ArjunaOTS.ArjunaSubtranAwareResourceHelper.narrow(resource);

        if (absRec == null)
          throw new BAD_PARAM(0, CompletionStatus.COMPLETED_NO);
      }
      catch (Exception e)
      {
        // can't be an ArjunaOTS.ArjunaSubtranAwareResource

        absRec = null;
      }
    }

    if (absRec == null)
    {
      corbaRec = new ResourceRecord(propagate, resource, coord,
          recCoordUid, this);
    }
    else
    {
      Uid u = null;
      OTSAbstractRecord otsRec;

      try
      {
        otsRec = com.arjuna.ArjunaOTS.OTSAbstractRecordHelper.narrow(absRec);

        if (otsRec == null)
          throw new BAD_PARAM(0, CompletionStatus.COMPLETED_NO);
      }
      catch (Exception e)
      {
        otsRec = null;
      }
View Full Code Here

Examples of org.omg.CORBA.BAD_PARAM

                    }

          control = null;
        }
        else
          throw new BAD_PARAM(0, CompletionStatus.COMPLETED_NO);
      }
      catch (SystemException e)
      {
        /*
         * Not an Arjuna control!! Should not happen!!
View Full Code Here

Examples of org.omg.CORBA.BAD_PARAM

     * @exception InvalidName
     */
    protected void validateName(NameComponent[] n) throws InvalidName {
        // perform various name validations
        if (n == null) {
            throw new BAD_PARAM(MinorCodes.MinorObjectIsNull, CompletionStatus.COMPLETED_NO);
        }

        // Valid name?
        if (n.length < 1) {
            throw new InvalidName();
View Full Code Here

Examples of org.omg.CORBA.BAD_PARAM

    CodeBaseProxy(ORBInstance orb, ServiceContext ctx) {

        if (ctx.context_id != org.omg.IOP.SendingContextRunTime.value) {
            // TODO: add minor code?
            throw new BAD_PARAM();
        }

        this.orbInstance_ = orb;
        this.ctx = ctx;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.