コード例 #1
0
 /**
  * Demonstrate how a EJB can call different annotated asynchronous methods within the same
  * application.
  */
 private void waitForAnotherAsyncResult2()
     throws InterruptedException, ExecutionException, TimeoutException {
   parallelBean.callInterfaceAnnotatedMethod();
 }
コード例 #2
0
 /**
  * Invoke a remote synchronous EJB method. The remote method uses asynchronous calls internally,
  * to parallelize it's workload.
  */
 private void callAnEJBwithAsyncAccess() {
   Collection<String> results = parallelBean.invokeAsyncParallel();
   LOGGER.info("Results of the parallel (server) processing : " + results);
 }