Package java.rmi

Examples of java.rmi.NoSuchObjectException


      // If remote EJB2.x Client
      else if (Remote.class.isAssignableFrom(actualInvokingClass)
            || EJBObject.class.isAssignableFrom(actualInvokingClass)
            || EJBHome.class.isAssignableFrom(actualInvokingClass))
      {
         t = new NoSuchObjectException(original.getMessage());
      }
      // Business interface
      else
      {
         // Take no action, this is here just for readability
View Full Code Here


      // If remote EJB2.x Client
      else if (Remote.class.isAssignableFrom(actualInvokingClass)
            || EJBObject.class.isAssignableFrom(actualInvokingClass)
            || EJBHome.class.isAssignableFrom(actualInvokingClass))
      {
         t = new NoSuchObjectException(original.getMessage());
      }
      // Business interface
      else
      {
         // Take no action, this is here just for readability
View Full Code Here

                throw new SystemException("Unexpected load exception", e);
            }

            // Did we find the instance?
            if (instance == null) {
                throw new InvalidateReferenceException(new NoSuchObjectException("Not Found"));
            }

            // remember instance until it is returned to the cache
            checkedOutInstances.put(primaryKey, instance);
        }
View Full Code Here

        entrancyTracker.enter(deploymentInfo, callContext.getPrimaryKey());
        try {
            CmpEngine cmpEngine = getCmpEngine(deploymentInfo);
            bean = (EntityBean) cmpEngine.loadBean(callContext, callContext.getPrimaryKey());
            if (bean == null) {
                throw new NoSuchObjectException(deploymentInfo.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

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

        if (queueEntry != null) {
            // if bean is timed out, destroy it
            if (entry.isTimedOut()) {
                entry = getBeanIndex(callContext).remove(entry.primaryKey);
                handleTimeout(entry, callContext);
                throw new InvalidateReferenceException(new NoSuchObjectException("Stateful SessionBean has timed-out"));
            }
            return entry.bean;
        } else {
            // if it is not in the queue, the bean is already being invoked
            // the only reentrant/concurrent operations allowed are Session synchronization callbacks
View Full Code Here

    private Object activateInstance(Object primaryKey, ThreadContext callContext) throws SystemException, ApplicationException {
        // attempt to active a passivated entity
        BeanEntry entry = activate(primaryKey);
        if (entry == null) {
            throw new InvalidateReferenceException(new NoSuchObjectException("Not Found"));
        }

        if (entry.isTimedOut()) {
            // Since the bean instance hasn't had its ejbActivate() method called yet,
            // it is still considered to be passivated at this point. Instances that timeout
            // while passivated must be evicted WITHOUT having their ejbRemove()
            // method invoked. Section 6.6 of EJB 1.1 specification.
            throw new InvalidateReferenceException(new NoSuchObjectException("Timed Out"));
        }

        // call the activate method
        Operation currentOperation = callContext.getCurrentOperation();
        callContext.setCurrentOperation(Operation.ACTIVATE);
View Full Code Here

    }

    public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
        if (isInvalidReference) {
            if (remote || java.rmi.Remote.class.isAssignableFrom(method.getDeclaringClass())){
                throw new NoSuchObjectException("reference is invalid");
            } else {
                throw new NoSuchEJBException("reference is invalid");
            }
        }
View Full Code Here

                } catch (EJBTransactionRequiredException e) {
                    throw new TransactionRequiredException(e.getMessage());
                } catch (EJBTransactionRolledbackException e) {
                    throw new TransactionRolledbackException(e.getMessage());
                } catch (NoSuchEJBException e) {
                    throw new NoSuchObjectException(e.getMessage());
                } catch (NoSuchEntityException e) {
                    throw new NoSuchObjectException(e.getMessage());
                } catch (EJBException e) {
                    throw new RemoteException("Invocation failed", e);
                } catch (Error e) {
                    throw new RemoteException("Unexpected error", e);
                }
View Full Code Here

        if(instance == null) {
            final ComponentView view = context.getPrivateData(ComponentView.class);
            if(view.getViewClass() == component.getEjbLocalObjectType()) {
                throw new NoSuchObjectLocalException("Could not find SFSB " + component.getComponentName() + " with " + sessionId);
            } else if(view.getViewClass() == component.getEjbObjectType()) {
                throw new NoSuchObjectException("Could not find SFSB " + component.getComponentName() + " with " + sessionId);
            } else {
                throw new NoSuchEJBException("Could not find SFSB " + component.getComponentName() + " with " + sessionId);
            }
        }
        try {
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.