Examples of CommandService


Examples of org.jbpm.client.CommandService

    Command acquireJobsCommand = jobExecutor.getAcquireJobsCommand();
    return (Collection<Long>) commandService.execute(acquireJobsCommand);
  }

  protected Date getNextDueDate() {
    CommandService commandService = jobExecutor.getCommandExecutor();
    Command getNextDueDate = jobExecutor.getNextDueDateCommand();
    return (Date) commandService.execute(getNextDueDate);
  }
View Full Code Here

Examples of org.jbpm.client.CommandService

   * transaction. */
  protected void handleJobExecutionException(Environment environment, Job job, Throwable exception) {
    Transaction transaction = environment.getTransaction();
    transaction.setRollbackOnly();

    CommandService commandService = (CommandService) environment.get(CommandService.class);
    JobExceptionHandler jobExceptionHandler = new JobExceptionHandler(job.getDbid(), exception, commandService);
    transaction.addListener(jobExceptionHandler, Transaction.EVENT_AFTERCOMPLETION);
  }
View Full Code Here

Examples of org.jbpm.client.CommandService

          Collection<Long> jobDbids = null;
          jobDbids = queue.take();
          log.fine("took job(s) "+jobDbids+" from queue");

          for (Long jobDbid: jobDbids) {
            CommandService commandService = jobExecutor.getCommandExecutor();
            commandService.execute(new ExecuteJobCommand(jobDbid));
          }
        } catch (InterruptedException e) {
          log.finest("waiting for acquired jobs got interrupted");
        } catch (Exception e) {
          log.log(Level.SEVERE, "exception in job executor thread", e);
View Full Code Here

Examples of org.jbpm.pvm.internal.cmd.CommandService

  }

  public Object parse(Element element, Parse parse, Parser parser) {
    CommandServiceDescriptor commandServiceDescriptor = new CommandServiceDescriptor();

    CommandService commandService = getCommandService(element, parse, parser);
    commandServiceDescriptor.setCommandService(commandService);
   
    List<Element> interceptorElements = XmlUtil.elements(element);
    for (Element interceptorElement : interceptorElements) {
      Descriptor interceptorDescriptor = (Descriptor) parser.parseElement(interceptorElement, parse, WireParser.CATEGORY_INTERCEPTOR);
View Full Code Here

Examples of org.jbpm.pvm.internal.cmd.CommandService

    if (isTransactional) {
      Environment environment = Environment.getCurrent();
      Transaction transaction = (environment!=null ? environment.get(Transaction.class) : null);
      if (transaction!=null) {
        log.trace("registering exception handler to "+transaction);
        CommandService commandService = environment.get(CommandService.class);
        if (commandService==null) {
          throw new JbpmException("environment doesn't have a command service for registering transactional exception handler", exception);
        }
        ExceptionHandlerSynchronization exceptionHandlerSynchronization = new ExceptionHandlerSynchronization(
                this, execution,
View Full Code Here

Examples of org.jbpm.pvm.internal.cmd.CommandService

    if (userId!=null) {
      environment.setUserId(userId);
    }
    try {
      CommandService commandService = environment.get(CommandService.class);
      commandService.execute(command);
    } finally {
      if (userId!=null) {
        environment.setUserId(null);
      }
    }
View Full Code Here

Examples of org.jbpm.pvm.internal.cmd.CommandService

      }
    }
  }

  protected Collection<Long> acquireJobs() {
    CommandService commandService = jobExecutor.getCommandExecutor();
    Command<Collection<Long>> acquireJobsCommand = jobExecutor.getAcquireJobsCommand();
    return commandService.execute(acquireJobsCommand);
  }
View Full Code Here

Examples of org.jbpm.pvm.internal.cmd.CommandService

    Command<Collection<Long>> acquireJobsCommand = jobExecutor.getAcquireJobsCommand();
    return commandService.execute(acquireJobsCommand);
  }

  protected Date getNextDueDate() {
    CommandService commandService = jobExecutor.getCommandExecutor();
    Command<Date> getNextDueDate = jobExecutor.getNextDueDateCommand();
    return commandService.execute(getNextDueDate);
  }
View Full Code Here

Examples of org.jbpm.pvm.internal.cmd.CommandService

 
  CommandService commandService;
  List<Descriptor> interceptorDescriptors;

  public Object construct(WireContext wireContext) {
    CommandService interceptedCommandService = commandService;
    if (interceptorDescriptors!=null) {
      for (int i=interceptorDescriptors.size()-1 ; i>=0; i--) {
        Descriptor descriptor = interceptorDescriptors.get(i);
        Interceptor interceptor = (Interceptor) descriptor.construct(wireContext);
        interceptor.setNext(interceptedCommandService);
View Full Code Here

Examples of org.jbpm.pvm.internal.cmd.CommandService

            Collection<Long> jobDbids = null;
            jobDbids = queue.take();
            log.debug("took job(s) "+jobDbids+" from queue");

            for (Long jobDbid: jobDbids) {
              CommandService commandService = jobExecutor.getCommandExecutor();
              commandService.execute(new ExecuteJobCmd(jobDbid));
            }
          } catch (InterruptedException e) {
            log.trace("waiting for acquired jobs got interrupted");
          } catch (Exception e) {
            log.error("exception in job executor thread", e);
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.