Examples of TaskContext


Examples of gc.base.task.TaskContext

        try {
          List<Gptdb2SolrInstance> instances = Gptdb2SolrInstance.createInstancesFromConfig();
          for (Gptdb2SolrInstance instance: instances) {
            //System.err.println("???????????????????????????????");
            XmlTypes xmlTypes = XmlTypes.createFromConfig();
            TaskContext context = new TaskContext("Gptdb2SolrTask");
            context.getStats().setFeedbackMillis(60000);
            Gptdb2SolrTask task = new Gptdb2SolrTask(context,xmlTypes,instance);
            SingleTaskExecutor.executeTask(task);
          }
        } catch (Exception e) {
          e.printStackTrace();
View Full Code Here

Examples of org.jbpm.pvm.internal.env.TaskContext

    Environment environment = Environment.getCurrent();
    DbSession dbSession = environment.get(DbSession.class);
    TaskImpl task = dbSession.findTaskByExecution(execution);

    // make task available to mail templates through task context
    TaskContext taskContext = new TaskContext(task);
    environment.setContext(taskContext);
    try {
      Collection<Message> messages = mailProducer.produce(execution);
      environment.get(MailSession.class).send(messages);
    } finally {
View Full Code Here

Examples of tasks.TaskContext

        put(Headers.QUEUE_NAME, QUEUE_NAME);
        put(Headers.TASK_NAME, TASK_NAME);
        put(Headers.TASK_IMPL, TASK_IMPL);
        put(Headers.TASK_RETRY_COUNT, String.valueOf(RETRY_COUNT));
       
        TaskContext context = new TaskContext(request);
        assertEquals(QUEUE_NAME, context.getQueueName());
        assertEquals(TASK_IMPL, context.getTaskClassName());
        assertEquals((Integer) RETRY_COUNT, Integer.valueOf(context.getCurrentRetryCount()));
        assertEquals(TASK_NAME, context.getTaskName());
    }
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.