Package java.rmi

Examples of java.rmi.NoSuchObjectException


     * @return the converted exception or the original exception
     */
    protected Throwable convertThrowable(final Throwable throwable) {
        // see 14.3.9 chapter EJB3
        if (isExtendingRmiRemote() && throwable instanceof NoSuchEJBException) {
            NoSuchObjectException ne = new NoSuchObjectException(throwable.getMessage());
            ne.detail = throwable;
            return ne;
        }

        // see 14.4.2.2 chapter EJB3
View Full Code Here


            // insert
            cache.put(id, instance);
         }
         catch(Throwable x)
         {
            throw new NoSuchObjectException(x.getMessage());
         }
      }
      return instance;
   }
View Full Code Here

               cache.insert(id, ctx);
            }
            catch (Throwable x)
            {
               log.debug("Activation failure", x);
               throw new NoSuchObjectException(x.getMessage());
            }
         }
      }

      return ctx;
View Full Code Here

    */
   public Object invokeRemote(Object proxy, Method method, Object[] args) throws Throwable
   {
      boolean trace = log.isTraceEnabled();
      HARMIServer target = (HARMIServer)getRemoteTarget();
      NoSuchObjectException nsoe = null;
      Exception lastException = null;
      while (target != null)
      {        
         try
         {
View Full Code Here

         }
         catch(NoSuchEJBException e)
         {
            if(log.isTraceEnabled())
               log.trace("Throwing " + e.getClass().getName(), e);
            throw new NoSuchObjectException(e.getMessage());
         }

         InvocationResponse response = new InvocationResponse(null);
         return response;
      }
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

    }

    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

                    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

    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");
            }
        }
        if (!(Object.class.equals(method.getDeclaringClass())
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");
            }
        }
        getDeploymentInfo(); // will throw an exception if app has been undeployed.
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.