Package org.springframework.remoting

Examples of org.springframework.remoting.RemoteLookupFailureException


    Remote 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


    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

    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.doInvoke(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

  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

  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 && Remote.class.isAssignableFrom(getServiceInterface())) {
      try {
        stub = PortableRemoteObject.narrow(stub, getServiceInterface());
      }
      catch (ClassCastException ex) {
        throw new RemoteLookupFailureException(
            "Could not narrow RMI stub to service interface [" + getServiceInterface().getName() + "]", ex);
      }
    }
    if (!(stub instanceof Remote)) {
      throw new RemoteLookupFailureException("Located RMI stub of class [" + stub.getClass().getName() +
          "], with JNDI name [" + getJndiName() + "], does not implement interface [java.rmi.Remote]");
    }
    return (Remote) stub;
  }
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.
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.