Package java.rmi

Examples of java.rmi.NoSuchObjectException


      throw new EOFException();

  case 0x00:
      // REMIND: close the response input stream?
      // REMIND: Do we want to read a server-supplied reason string?
      return new NoSuchObjectException("no such object in table");

  case 0x01:
      return null;

  default:
View Full Code Here


        entrancyTracker.enter(beanContext, callContext.getPrimaryKey());
        try {
            bean = (EntityBean) cmpEngine.loadBean(callContext, callContext.getPrimaryKey());
            if (bean == null) {
                throw new NoSuchObjectException(beanContext.getDeploymentID() + " : " + callContext.getPrimaryKey());
            }

            returnValue = runMethod.invoke(bean, args);

            // when there is not transaction, merge the data from the bean back into the cmp engine
View Full Code Here

        TransactionPolicy txPolicy = createTransactionPolicy(beanContext.getTransactionType(callMethod, interfaceType), callContext);

        try {
            EntityBean entityBean = (EntityBean) cmpEngine.loadBean(callContext, callContext.getPrimaryKey());
            if (entityBean == null) {
                throw new NoSuchObjectException(callContext.getBeanContext().getDeploymentID() + " " + callContext.getPrimaryKey());
            }
            ejbRemove(entityBean);
            cmpEngine.removeBean(callContext);
        } catch (NoSuchObjectException e) {
            handleApplicationException(txPolicy, e, false);
View Full Code Here

    private void isValidReference(Method method) throws NoSuchObjectException {
        if (isInvalidReference) {
            if (interfaceType.isComponent() && interfaceType.isLocal()){
                throw new NoSuchObjectLocalException("reference is invalid");
            } else if (interfaceType.isComponent() || java.rmi.Remote.class.isAssignableFrom(method.getDeclaringClass())) {
                throw new NoSuchObjectException("reference is invalid");
            } else {
                throw new NoSuchEJBException("reference is invalid");
            }
        }
        getBeanContext(); // will throw an exception if app has been undeployed.
View Full Code Here

                    callContext.setCurrentOperation(Operation.LOAD);
                    bean.ejbLoad();
                }
            } catch (NoSuchEntityException e) {
                instanceManager.discardInstance(callContext, bean);
                throw new ApplicationException(new NoSuchObjectException("Entity not found: " + callContext.getPrimaryKey())/*.initCause(e)*/);
            } catch (Exception e) {
                instanceManager.discardInstance(callContext, bean);
                throw e;
            } finally {
                callContext.setCurrentOperation(orginalOperation);
View Full Code Here

        RMIReference ref = new RMIReference(obj);
        RMIObjectInfo info = exportedObjs.getByRef(ref);

        if (info == null) {
            // rmi.7C=Object {0} is not exported.
            throw new NoSuchObjectException(Messages.getString("rmi.7C", obj)); //$NON-NLS-1$
        }
        boolean succeeded = info.sref.unexportObject(force);

        if (succeeded) {
            exportedObjs.removeByRef(ref);
View Full Code Here

    public static Remote getStub(Remote obj) throws NoSuchObjectException {
        RMIObjectInfo info = exportedObjs.getByRef(new RMIReference(obj));

        if (info == null) {
            // rmi.7C=Object {0} is not exported.
            throw new NoSuchObjectException(Messages.getString("rmi.7C", obj)); //$NON-NLS-1$
        }
        return info.stub;
    }
View Full Code Here

                RemoteException exToReturn = null;

                if (info == null) {
                    sref = null;
                    // rmi.75=No objects with {0} exported.
                    exToReturn = new NoSuchObjectException(
                            Messages.getString("rmi.75",id)); //$NON-NLS-1$
                } else {
                    sref = info.sref;

                    if (!sref.isSystem()) {
View Full Code Here

          "getServiceRegistration", regID);
  }
        ServiceRegistration reg = (ServiceRegistration)regByID.get(regID);
  if(reg == null) { // either expired or never existed
      throw new ThrowThis(
    new NoSuchObjectException("Not managing requested " +
              "registration object"));
  } else if(!ensureCurrent(reg)) { // check validity
      throw new ThrowThis(
    new NoSuchObjectException("Requested registration object" +
        "has expired"));
  }
  // Must be a valid registration at this point
        if (operationsLogger.isLoggable(Level.FINER)) {
      operationsLogger.exiting(mailboxSourceClass,
View Full Code Here

                result = java.rmi.server.RemoteObject.toStub(obj);
            }
        }

        if (result == null) {
            throw new NoSuchObjectException("object not exported");
        }

        return result;
    }
View Full Code Here

TOP

Related Classes of java.rmi.NoSuchObjectException

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.