Package org.springframework.remoting.support

Examples of org.springframework.remoting.support.RemoteInvocation.addAttribute()


            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


            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

        }
        RemoteInvocation remoteInvocation = createRemoteInvocation(methodInvocation);

        // Attribute Provides
        for (RemoteInvocationAttributeProvider attributeProvider : getRemoteInvocationAttributeProviders()) {                  //JVM 1.5
            remoteInvocation.addAttribute(attributeProvider.getAttributeName(), attributeProvider.getAttributeValue(remoteInvocation, null));
        }

        Object result = invocationHandler.invoke(remoteInvocation);

        if (result instanceof RemoteInvocationResultWrapper) {
View Full Code Here

    pfb.setServiceInterface(ITestBean.class);
    pfb.setServiceUrl("http://myurl");
    pfb.setRemoteInvocationFactory(new RemoteInvocationFactory() {
      public RemoteInvocation createRemoteInvocation(MethodInvocation methodInvocation) {
        RemoteInvocation invocation = new RemoteInvocation(methodInvocation);
        invocation.addAttribute("myKey", "myValue");
        try {
          invocation.addAttribute("myKey", "myValue");
          fail("Should have thrown IllegalStateException");
        }
        catch (IllegalStateException ex) {
View Full Code Here

    pfb.setRemoteInvocationFactory(new RemoteInvocationFactory() {
      public RemoteInvocation createRemoteInvocation(MethodInvocation methodInvocation) {
        RemoteInvocation invocation = new RemoteInvocation(methodInvocation);
        invocation.addAttribute("myKey", "myValue");
        try {
          invocation.addAttribute("myKey", "myValue");
          fail("Should have thrown IllegalStateException");
        }
        catch (IllegalStateException ex) {
          // expected: already defined
        }
View Full Code Here

            }
        }

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

        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

    pfb.setServiceUrl("http://myurl");
    pfb.setRemoteInvocationFactory(new RemoteInvocationFactory() {
      @Override
      public RemoteInvocation createRemoteInvocation(MethodInvocation methodInvocation) {
        RemoteInvocation invocation = new RemoteInvocation(methodInvocation);
        invocation.addAttribute("myKey", "myValue");
        try {
          invocation.addAttribute("myKey", "myValue");
          fail("Should have thrown IllegalStateException");
        }
        catch (IllegalStateException ex) {
View Full Code Here

      @Override
      public RemoteInvocation createRemoteInvocation(MethodInvocation methodInvocation) {
        RemoteInvocation invocation = new RemoteInvocation(methodInvocation);
        invocation.addAttribute("myKey", "myValue");
        try {
          invocation.addAttribute("myKey", "myValue");
          fail("Should have thrown IllegalStateException");
        }
        catch (IllegalStateException ex) {
          // expected: already defined
        }
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.