Queue<JavaProcessBuilder> queue = QueueFactory.DEFAULT_QUEUE;
if (queueId != null) {
CronQueueProvider queueProvider = cronExtension.getQueueProvider();
queue = (Queue)queueProvider.getQueue(queueId);
}
JavaProcessBuilder jpb = queue.newProcessBuilder(Locale.getDefault());
final String jobName = triggerDetails.toString() + "-trigger";
jpb.setProcessName(jobName);
jpb.setProcessOccurrence(occurence);
TriggerSupplies triggerSupplies = new TriggerSupplies(beanManager, triggerDetails.getQualifier(), triggerDetails.getQualifiers());
jpb.setProcessDetails(new TriggerRunner(), "execute", new Class[] { TriggerSupplies.class }, new Object[] { triggerSupplies });
jpb.setProcessPersistence(false);
jpb.newProcess();
}