Examples of MethodResultEntry


Examples of org.springmodules.javaspaces.entry.MethodResultEntry

    pf.addAdvice(new PerformanceMonitorInterceptor());
    pf.addAdvice(si);
    ITestBean proxy = (ITestBean) pf.getProxy();

    // nothing before the call
    assertNull(template.getSpace().readIfExists(new MethodResultEntry(), template.getCurrentTransaction(), 100));
    ITestBean lazyResult = proxy.getSpouse();
    System.out.println("spouse name is " + lazyResult.getClass());
    assertTrue(AopUtils.isCglibProxyClass(lazyResult.getClass()));
    System.out.println("should not be initialized");
    System.out.println(lazyResult.getClass());
View Full Code Here

Examples of org.springmodules.javaspaces.entry.MethodResultEntry

    return Enhancer.create(call.getMethod().getReturnType(), lazyCallback);
  }

  protected Object handleResultRetrieval(AbstractMethodCallEntry call) throws Throwable {
    MethodResultEntry result = null;

    result = takeResult(call);
    // If it's an exception, throw it to the caller. The
    // exception will propogate up the call chain.
    if (!result.successful()) {
      throw result.getFailure();
    }
    else {
      return result.getResult();
    }
  }
View Full Code Here

Examples of org.springmodules.javaspaces.entry.MethodResultEntry

      return result.getResult();
    }
  }

  protected MethodResultEntry takeResult(AbstractMethodCallEntry call) throws Throwable {
    MethodResultEntry result = null;
    MethodResultEntry template = createMethodResultEntry(call);

    result = (MethodResultEntry) jsTemplate.take(template, timeoutMillis);

    if (log.isDebugEnabled())
      log.debug("Result=" + result);
View Full Code Here

Examples of org.springmodules.javaspaces.entry.MethodResultEntry

   * Create the specific method result entry
   * @param call the call entry method
   * @return the method result entry.
   */
  protected MethodResultEntry createMethodResultEntry(AbstractMethodCallEntry call){
    return new MethodResultEntry((Method) null, call.uid, null);
  }
View Full Code Here

Examples of org.springmodules.javaspaces.entry.MethodResultEntry

              log.debug("Skipping out of loop...");
            return null;
          }

          try {
            MethodResultEntry result = invokeMethod(call, delegate);
            // push the result back to the JavaSpace
            js.write(result, transaction, Lease.FOREVER);
          }
          catch (Exception ex) {
            // TODO fix me, should translate to JavaSpaceException
View Full Code Here

Examples of org.springmodules.javaspaces.entry.MethodResultEntry

   */
  protected MethodResultEntry invokeMethod(AbstractMethodCallEntry call, Object localDelegate)
      throws IllegalAccessException {
    if (log.isDebugEnabled())
      log.debug("call is " + call.getClass().getName());
    MethodResultEntry result = call.invokeMethod(localDelegate);

    if (log.isDebugEnabled())
      log.debug("Got result " + result.result);
    return result;
  }
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.