Package java.rmi

Examples of java.rmi.Remote


   * @return the invocation result, if any
   * @throws Throwable in case of invocation failure
   * @see #invoke
   */
  protected Object refreshAndRetry(MethodInvocation invocation) throws Throwable {
    Remote freshStub = null;
    synchronized (this.stubMonitor) {
      this.cachedStub = null;
      freshStub = lookupStub();
      if (this.cacheStub) {
        this.cachedStub = freshStub;
View Full Code Here


        if (logger.isDebugEnabled()) {
          logger.debug("Creating JAX-RPC proxy for JAX-RPC port [" + this.portQName +
              "], using port interface [" + portInterface.getName() + "]");
        }
        Remote remoteObj = service.getPort(this.portQName, portInterface);

        if (logger.isDebugEnabled()) {
          Class serviceInterface = getServiceInterface();
          if (serviceInterface != null) {
            boolean isImpl = serviceInterface.isInstance(remoteObj);
            logger.debug("Using service interface [" + serviceInterface.getName() + "] for JAX-RPC port [" +
                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

   * @see #getPortStub()
   * @see #doInvoke(org.aopalliance.intercept.MethodInvocation, java.rmi.Remote)
   * @see #performJaxRpcCall(org.aopalliance.intercept.MethodInvocation, javax.xml.rpc.Service)
   */
  protected Object doInvoke(MethodInvocation invocation) throws Throwable {
    Remote stub = getPortStub();
    if (stub != null) {
      // JAX-RPC port stub available -> traditional RMI stub invocation.
      if (logger.isTraceEnabled()) {
        logger.trace("Invoking operation '" + invocation.getMethod().getName() + "' on JAX-RPC port stub");
      }
View Full Code Here

   * @see #lookupStub
   */
  public void prepare() throws NamingException, RemoteLookupFailureException {
    // Cache RMI stub on initialization?
    if (this.lookupStubOnStartup) {
      Remote remoteObj = lookupStub();
      if (logger.isDebugEnabled()) {
        if (remoteObj instanceof RmiInvocationHandler) {
          logger.debug("JNDI RMI object [" + getJndiName() + "] is an RMI invoker");
        }
        else if (getServiceInterface() != null) {
View Full Code Here

   * @see java.rmi.ConnectException
   * @see java.rmi.ConnectIOException
   * @see java.rmi.NoSuchObjectException
   */
  public Object invoke(MethodInvocation invocation) throws Throwable {
    Remote stub = null;
    try {
      stub = getStub();
    }
    catch (NamingException ex) {
      throw new RemoteLookupFailureException("JNDI lookup for RMI service [" + getJndiName() + "] failed", ex);
View Full Code Here

   * @return the invocation result, if any
   * @throws Throwable in case of invocation failure
   * @see #invoke
   */
  protected Object refreshAndRetry(MethodInvocation invocation) throws Throwable {
    Remote freshStub = null;
    synchronized (this.stubMonitor) {
      this.cachedStub = null;
      try {
        freshStub = lookupStub();
      }
View Full Code Here

          if (logger.isDebugEnabled()) {
            logger.debug("Creating JAX-RPC proxy for JAX-RPC port [" + this.portQName +
                "], using port interface [" + portInterface.getName() + "]");
          }
          Remote remoteObj = service.getPort(this.portQName, portInterface);

          if (logger.isDebugEnabled()) {
            Class serviceInterface = getServiceInterface();
            if (serviceInterface != null) {
              boolean isImpl = serviceInterface.isInstance(remoteObj);
              logger.debug("Using service interface [" + serviceInterface.getName() + "] for JAX-RPC port [" +
                  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

   * @see #getPortStub()
   * @see #doInvoke(org.aopalliance.intercept.MethodInvocation, java.rmi.Remote)
   * @see #performJaxRpcCall(org.aopalliance.intercept.MethodInvocation, javax.xml.rpc.Service)
   */
  protected Object doInvoke(MethodInvocation invocation) throws Throwable {
    Remote stub = getPortStub();
    try {
      if (stub != null) {
        // JAX-RPC port stub available -> traditional RMI stub invocation.
        if (logger.isTraceEnabled()) {
          logger.trace("Invoking operation '" + invocation.getMethod().getName() + "' on JAX-RPC port stub");
View Full Code Here

        // binding.setURI(uri.toString());

        wire = service.getRuntimeWire(binding);
        Interface serviceInterface = service.getInterfaceContract().getInterface();

        Remote rmiProxy = createRmiService(serviceInterface);

        try {

            rmiHost.registerService(binding.getServiceName(), getPort(binding.getPort()), rmiProxy);
View Full Code Here

    }

    public Remote getPort(QName qName, Class portClass) throws ServiceException {
        if (qName != null) {
            String portName = qName.getLocalPart();
            Remote port = internalGetPort(portName);
            return port;
        }
        return getPort(portClass);
    }
View Full Code Here

TOP

Related Classes of java.rmi.Remote

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.