Package org.springframework.core.task

Examples of org.springframework.core.task.TaskExecutor.execute()


    final CountDownLatch latch = new CountDownLatch(100);
    final Set<Integer> results = new HashSet<Integer>();
    for (int i = 100; i < 200; i++) {
      results.add(i);
      final int j = i;
      executor.execute(new Runnable() {
        public void run() {
          String result = gw.send(j + "Hello world!"); // first 3 bytes is correlationid
          assertEquals(j + "Hello world!:echo", result);
          results.remove(j);
          latch.countDown();
View Full Code Here


    }
    else {
      // do nothing; by default contexts do not wait for services.
    }

    executor.execute(contextRefresh);
  }

  /**
   * Closing an application context is a potentially long-running activity,
   * however, we *have* to do it synchronously during the event process as the
View Full Code Here

   
    public void start() {
        synchronized (contextLock) {
            if (ctx == null) {
                TaskExecutor taskExecutor = new SimpleAsyncTaskExecutor("HelloJmsDemo");
                taskExecutor.execute(this);
            }
        }
    }
   
    public void stop() {
View Full Code Here

    public static void generateXpdlImage(final String designerwebBaseUrl, final String processDefId, boolean asynchronous) {
        String profile = DynamicDataSourceManager.getCurrentProfile();
       
        TaskExecutor executor = (TaskExecutor) WorkflowUtil.getApplicationContext().getBean("xpdlImageExecutor");
        executor.execute(new XpdlImageTask(profile, designerwebBaseUrl, processDefId));
    }

    public static void createXpdlImage(String designerwebBaseUrl, String processDefId) {
        String baseDir = getXpdlImagePath(processDefId);
        ApplicationContext appContext = WorkflowUtil.getApplicationContext();
View Full Code Here

    }
    else {
      // do nothing; by default contexts do not wait for services.
    }

    executor.execute(contextRefresh);
  }

  /**
   * Closing an application context is a potentially long-running activity,
   * however, we *have* to do it synchronously during the event process as the
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.