Package org.springframework.remoting.support

Examples of org.springframework.remoting.support.RemoteInvocationResult


    if (AopUtils.isToStringMethod(methodInvocation.getMethod())) {
      return "HTTP invoker proxy for service URL [" + getServiceUrl() + "]";
    }

    RemoteInvocation invocation = createRemoteInvocation(methodInvocation);
    RemoteInvocationResult result = null;
    try {
      result = executeRequest(invocation);
    }
    catch (Throwable ex) {
      throw convertHttpInvokerAccessException(ex);
    }
    try {
      return recreateRemoteInvocationResult(result);
    }
    catch (Throwable ex) {
      if (result.hasInvocationTargetException()) {
        throw ex;
      }
      else {
        throw new RemoteInvocationFailureException("Invocation of method [" + methodInvocation.getMethod() +
            "] failed in HTTP invoker remote service at [" + getServiceUrl() + "]", ex);
View Full Code Here


    Assert.notNull(this.proxy, "HttpInvokerServiceExporter has not been initialized");

    try {
      RemoteInvocation invocation = readRemoteInvocation(request);
      RemoteInvocationResult result = invokeAndCreateResult(invocation, this.proxy);
      writeRemoteInvocationResult(request, response, result);
    }
    catch (ClassNotFoundException ex) {
      throw new NestedServletException("Class not found during deserialization", ex);
    }
View Full Code Here

    if (AopUtils.isToStringMethod(methodInvocation.getMethod())) {
      return "JMS invoker proxy for queue [" + this.queue + "]";
    }

    RemoteInvocation invocation = createRemoteInvocation(methodInvocation);
    RemoteInvocationResult result = null;
    try {
      result = executeRequest(invocation);
    }
    catch (JMSException ex) {
      throw convertJmsInvokerAccessException(ex);
    }
    try {
      return recreateRemoteInvocationResult(result);
    }
    catch (Throwable ex) {
      if (result.hasInvocationTargetException()) {
        throw ex;
      }
      else {
        throw new RemoteInvocationFailureException("Invocation of method [" + methodInvocation.getMethod() +
            "] failed in JMS invoker remote service at queue [" + this.queue + "]", ex);
View Full Code Here

          TransactionMgr.abort();
        }
          if (!currentTransactions.empty()) {
            currentTransactions.get(0).currentInvoker = null;
          }
        return new RemoteInvocationResult(e.exception);
      }
      else if (result.getValue() instanceof RemoteInvocationResultWrapper) {
        RemoteInvocationResultWrapper wrapper = (RemoteInvocationResultWrapper)result.getValue();
        Boolean wasAborted = (Boolean)wrapper.getAttribute(WAS_ABORTED);
          LightweightStack<TransactionData> currentTransactions = _transactionStorage.get();
View Full Code Here

            remoteInvocation.addAttribute(attributeProvider.getAttributeName(), attributeProvider.getAttributeValue(remoteInvocation, null));
        }

         TransactionMgr.beginRemoteCall(config, remoteInvocation);
       
        RemoteInvocationResult result = nestedHttpInvokerRequestExecutor.executeRequest(config, remoteInvocation);

        TransactionMgr.endRemoteCall(result);
       
        if (result.getValue() instanceof RemoteInvocationResultWrapper) {
            RemoteInvocationResultWrapper resultWrapper = (RemoteInvocationResultWrapper)result.getValue();

            // Attribute Consumers
            for (RemoteInvocationAttributeConsumer attributeConsumer : getRemoteInvocationAttributeConsumers()) {
                attributeConsumer.consume(remoteInvocation.getArguments(), resultWrapper.getAttribute(attributeConsumer.getAttributeName()));
            }
            return new RemoteInvocationResult(resultWrapper.getReturnValue());
        }
        return result;
    }
View Full Code Here

            remoteInvocation.addAttribute(attributeProvider.getAttributeName(), attributeProvider.getAttributeValue(remoteInvocation, null));
        }

         TransactionMgr.beginRemoteCall(config, remoteInvocation);
       
        RemoteInvocationResult result = nestedHttpInvokerRequestExecutor.executeRequest(config, remoteInvocation);

        TransactionMgr.endRemoteCall(result);
       
        if (result.getValue() instanceof RemoteInvocationResultWrapper) {
            RemoteInvocationResultWrapper resultWrapper = (RemoteInvocationResultWrapper)result.getValue();

            // Attribute Consumers
            for (RemoteInvocationAttributeConsumer attributeConsumer : getRemoteInvocationAttributeConsumers()) {
                attributeConsumer.consume(remoteInvocation.getArguments(), resultWrapper.getAttribute(attributeConsumer.getAttributeName()));
            }
            return new RemoteInvocationResult(resultWrapper.getReturnValue());
        }
        return result;
    }
View Full Code Here


  public void onMessage(Message requestMessage, Session session) throws JMSException {
    RemoteInvocation invocation = readRemoteInvocation(requestMessage);
    if (invocation != null) {
      RemoteInvocationResult result = invokeAndCreateResult(invocation, this.proxy);
      writeRemoteInvocationResult(requestMessage, session, result);
    }
  }
View Full Code Here

    if (AopUtils.isToStringMethod(methodInvocation.getMethod())) {
      return "JMS invoker proxy for queue [" + this.queue + "]";
    }

    RemoteInvocation invocation = createRemoteInvocation(methodInvocation);
    RemoteInvocationResult result = null;
    try {
      result = executeRequest(invocation);
    }
    catch (JMSException ex) {
      throw convertJmsInvokerAccessException(ex);
    }
    try {
      return recreateRemoteInvocationResult(result);
    }
    catch (Throwable ex) {
      if (result.hasInvocationTargetException()) {
        throw ex;
      }
      else {
        throw new RemoteInvocationFailureException("Invocation of method [" + methodInvocation.getMethod() +
            "] failed in JMS invoker remote service at queue [" + this.queue + "]", ex);
View Full Code Here

    Assert.notNull(this.proxy, "HttpInvokerServiceExporter has not been initialized");

    try {
      RemoteInvocation invocation = readRemoteInvocation(request);
      RemoteInvocationResult result = invokeAndCreateResult(invocation, this.proxy);
      writeRemoteInvocationResult(request, response, result);
    }
    catch (ClassNotFoundException ex) {
      throw new NestedServletException("Class not found during deserialization", ex);
    }
View Full Code Here

    if (AopUtils.isToStringMethod(methodInvocation.getMethod())) {
      return "HTTP invoker proxy for service URL [" + getServiceUrl() + "]";
    }

    RemoteInvocation invocation = createRemoteInvocation(methodInvocation);
    RemoteInvocationResult result = null;
    try {
      result = executeRequest(invocation);
    }
    catch (Throwable ex) {
      throw convertHttpInvokerAccessException(ex);
View Full Code Here

TOP

Related Classes of org.springframework.remoting.support.RemoteInvocationResult

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.