Package org.springframework.remoting

Examples of org.springframework.remoting.RemoteLookupFailureException


    Object stub;
    try {
      stub = getStub();
    }
    catch (NamingException ex) {
      throw new RemoteLookupFailureException("JNDI lookup for RMI service [" + getJndiName() + "] failed", ex);
    }

    Context ctx = (this.exposeAccessContext ? getJndiTemplate().getContext() : null);
    try {
      return doInvoke(invocation, stub);
View Full Code Here


  public void prepare() throws RemoteLookupFailureException {
    try {
      this.burlapProxy = createBurlapProxy(this.proxyFactory);
    }
    catch (MalformedURLException ex) {
      throw new RemoteLookupFailureException("Service URL [" + getServiceUrl() + "] is invalid", ex);
    }
  }
View Full Code Here

    if (this.homeInterface != null) {
      try {
        homeObject = PortableRemoteObject.narrow(homeObject, this.homeInterface);
      }
      catch (ClassCastException ex) {
        throw new RemoteLookupFailureException(
            "Could not narrow EJB home stub to home interface [" + this.homeInterface.getName() + "]", ex);
      }
    }
    return homeObject;
  }
View Full Code Here

  protected Object refreshAndRetry(MethodInvocation invocation) throws Throwable {
    try {
      refreshHome();
    }
    catch (NamingException ex) {
      throw new RemoteLookupFailureException("Failed to locate remote EJB [" + getJndiName() + "]", ex);
    }
    return doInvoke(invocation);
  }
View Full Code Here

    try {
      ejb = getSessionBeanInstance();
      return RmiClientInterceptorUtils.invokeRemoteMethod(invocation, ejb);
    }
    catch (NamingException ex) {
      throw new RemoteLookupFailureException("Failed to locate remote EJB [" + getJndiName() + "]", ex);
    }
    catch (InvocationTargetException ex) {
      Throwable targetEx = ex.getTargetException();
      if (targetEx instanceof RemoteException) {
        RemoteException rex = (RemoteException) targetEx;
View Full Code Here

                  this.portQName + "] - " + (!isImpl ? "not" : "") + " directly implemented");
            }
          }

          if (!(remoteObj instanceof Stub)) {
            throw new RemoteLookupFailureException("Port stub of class [" + remoteObj.getClass().getName() +
                "] is not a valid JAX-RPC stub: it does not implement interface [javax.xml.rpc.Stub]");
          }
          Stub stub = (Stub) remoteObj;

          // Apply properties to JAX-RPC stub.
          preparePortStub(stub);

          // Allow for custom post-processing in subclasses.
          postProcessPortStub(stub);

          this.portStub = remoteObj;
        }

        else {
          // No JAX-RPC-compliant port interface -> using JAX-RPC dynamic calls.
          if (logger.isDebugEnabled()) {
            logger.debug("Using JAX-RPC dynamic calls for JAX-RPC port [" + this.portQName + "]");
          }
        }

        this.serviceToUse = service;
      }
      catch (ServiceException ex) {
        throw new RemoteLookupFailureException(
            "Failed to initialize service for JAX-RPC port [" + this.portQName + "]", ex);
      }
    }
  }
View Full Code Here

  public void prepare() throws RemoteLookupFailureException {
    try {
      this.hessianProxy = createHessianProxy(this.proxyFactory);
    }
    catch (MalformedURLException ex) {
      throw new RemoteLookupFailureException("Service URL [" + getServiceUrl() + "] is invalid", ex);
    }
  }
View Full Code Here

        logger.debug("Located RMI stub with URL [" + getServiceUrl() + "]");
      }
      return stub;
    }
    catch (MalformedURLException ex) {
      throw new RemoteLookupFailureException("Service URL [" + getServiceUrl() + "] is invalid", ex);
    }
    catch (NotBoundException ex) {
      throw new RemoteLookupFailureException(
          "Could not find RMI service [" + getServiceUrl() + "] in RMI registry", ex);
    }
    catch (RemoteException ex) {
      throw new RemoteLookupFailureException("Lookup of RMI stub failed", ex);
    }
  }
View Full Code Here

      if (getServiceInterface() != null && !(stub instanceof RmiInvocationHandler)) {
        try {
          stub = PortableRemoteObject.narrow(stub, getServiceInterface());
        }
        catch (ClassCastException ex) {
          throw new RemoteLookupFailureException(
              "Could not narrow RMI stub to service interface [" + getServiceInterface().getName() + "]", ex);
        }
      }
      return stub;
    }
    catch (NamingException ex) {
      throw new RemoteLookupFailureException("JNDI lookup for RMI service [" + getJndiName() + "] failed", ex);
    }
  }
View Full Code Here

    Object stub = null;
    try {
      stub = getStub();
    }
    catch (NamingException ex) {
      throw new RemoteLookupFailureException("JNDI lookup for RMI service [" + getJndiName() + "] failed", ex);
    }
    try {
      return doInvoke(invocation, stub);
    }
    catch (RemoteConnectFailureException ex) {
View Full Code Here

TOP

Related Classes of org.springframework.remoting.RemoteLookupFailureException

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.