Examples of RemoteInvocation


Examples of org.springframework.remoting.support.RemoteInvocation

  /**
   * @see XmlRpcServiceExporter#invoke(XmlRpcRequest)
   * @see #findMatchingMethod(XmlRpcRequest)
   */
  public Object invoke(XmlRpcRequest xmlRpcRequest) throws Exception {
    RemoteInvocation invocation = findMatchingMethod(xmlRpcRequest);
    return invoke(invocation, service);
  }
View Full Code Here

Examples of org.springframework.remoting.support.RemoteInvocation

      throws JMSException, MessageConversionException {

    Message m = super.toMessage(object, session);

    if (object instanceof RemoteInvocation) {
      RemoteInvocation invocation = (RemoteInvocation) object;
     
      // If its a invocation of remoteJobRequest
      if (invocation.getMethodName().equals("remoteJobRequest")) {
       
        // Attach Target ClusterID
        m.setStringProperty("targetClusterId",
                  parseClusterId((String) invocation
                      .getArguments()[0]));
      }
    }

    return m;
View Full Code Here

Examples of org.springframework.remoting.support.RemoteInvocation

    }

    public Object onCall(MuleEventContext eventContext) throws Exception
    {
        Object payload = eventContext.getMessage().getPayload();
        RemoteInvocation ri = (RemoteInvocation) payload;
        Object rval = delegate.execute(ri);
        return rval;
    }
View Full Code Here

Examples of org.springframework.remoting.support.RemoteInvocation

            {
                throw new TransformerException(this, e);
            }
        }

        RemoteInvocation ri = (RemoteInvocation) o;
        if (logger.isDebugEnabled())
        {
            logger.debug("request to execute " + ri.getMethodName());
            for (int i = 0; i < ri.getArguments().length; i++)
            {
                Object currentArgument = ri.getArguments()[i];
               
                StringBuilder buf = new StringBuilder(64);
                buf.append("with argument (");
                buf.append(currentArgument == null ? "<null>" : currentArgument.toString());
                buf.append(")");
View Full Code Here

Examples of org.springframework.remoting.support.RemoteInvocation

        Object[] args = {"localhost"};
        expect(mi.getArguments()).andReturn(args).anyTimes();

        replay(mi);

        RemoteInvocation ri = factory.createRemoteInvocation(mi);

        verify(mi);

        assertNull(ri.getAttribute(SecureRemoteInvocationFactory.SESSION_ID_KEY));
    }
View Full Code Here

Examples of org.springframework.remoting.support.RemoteInvocation

        Object[] args = {sessionKey};
        expect(mi.getArguments()).andReturn(args).anyTimes();

        replay(mi);

        RemoteInvocation ri = factory.createRemoteInvocation(mi);

        verify(mi);

        assertEquals(dummySessionId, ri.getAttribute(SecureRemoteInvocationFactory.SESSION_ID_KEY));
    }
View Full Code Here

Examples of org.springframework.remoting.support.RemoteInvocation

                log.trace("No 'shiro.session.id' system property found.  Heuristics have been exhausted; " +
                        "RemoteInvocation will not contain a sessionId.");
            }
        }

        RemoteInvocation ri = new RemoteInvocation(mi);
        if (sessionId != null) {
            ri.addAttribute(SESSION_ID_KEY, sessionId);
        }
        if (host != null) {
            ri.addAttribute(HOST_KEY, host);
        }

        return ri;
    }
View Full Code Here

Examples of org.springframework.remoting.support.RemoteInvocation

          for (Object invokerObject : transactionData.distributedInvokers) {
            if (invokerObject instanceof HttpInvokerClientConfiguration) {
             
              HttpInvokerClientConfiguration invoker = (HttpInvokerClientConfiguration)invokerObject;
              HttpInvokerRequestExecutor nestedHttpInvokerRequestExecutor = new SimpleHttpInvokerRequestExecutor();
              RemoteInvocation call = new RemoteInvocation(action, new Class<?>[0], new Object[0]);
              call.addAttribute(TXN_ID, transactionData.distributedTransactionID);
              try {
                nestedHttpInvokerRequestExecutor.executeRequest(invoker, call);
              }
              catch (Exception e) {
                _log.error("Completing distributed transaction failed", e);
View Full Code Here

Examples of org.springframework.remoting.support.RemoteInvocation

            // to re-tell it to abort the transaction
            if (invokerObject != rootData.currentInvoker) {
              if (invokerObject instanceof HttpInvokerClientConfiguration) {
                HttpInvokerClientConfiguration invoker = (HttpInvokerClientConfiguration)invokerObject;
                HttpInvokerRequestExecutor nestedHttpInvokerRequestExecutor = new SimpleHttpInvokerRequestExecutor();
                RemoteInvocation call = new RemoteInvocation(ABORT_TXN, new Class<?>[0], new Object[0]);
                  call.addAttribute(TXN_ID, rootData.distributedTransactionID);
                try {
                  nestedHttpInvokerRequestExecutor.executeRequest(invoker, call);
                }
                catch (Exception e) {
                  _log.error("Aborting distributed transaction failed", e);
View Full Code Here

Examples of org.springframework.remoting.support.RemoteInvocation

   */
  public void handleRequest(HttpServletRequest request, HttpServletResponse response)
      throws ServletException, IOException {

    try {
      RemoteInvocation invocation = readRemoteInvocation(request);
      RemoteInvocationResult result = invokeAndCreateResult(invocation, getProxy());
      writeRemoteInvocationResult(request, response, result);
    }
    catch (ClassNotFoundException ex) {
      throw new NestedServletException("Class not found during deserialization", ex);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.