Search in sources :

Example 31 with JobOperator

use of javax.batch.operations.JobOperator in project quickstart by wildfly.

the class BatchController method startImport.

public void startImport() {
    JobOperator jobOperator = BatchRuntime.getJobOperator();
    Properties jobParameters = new Properties();
    jobParameters.setProperty("fileName", getFileName());
    long execID = jobOperator.start("import-file", jobParameters);
    facesContext.addMessage(null, new FacesMessage(FacesMessage.SEVERITY_INFO, "New job execution #" + execID + " running. Importing file:" + getFileName(), null));
}
Also used : JobOperator(javax.batch.operations.JobOperator) Properties(java.util.Properties) FacesMessage(javax.faces.application.FacesMessage)

Aggregations

JobOperator (javax.batch.operations.JobOperator)31 Properties (java.util.Properties)22 Test (org.junit.Test)21 JobExecution (javax.batch.runtime.JobExecution)13 ModelNode (org.jboss.dmr.ModelNode)5 ArrayList (java.util.ArrayList)4 StepExecution (javax.batch.runtime.StepExecution)3 NoSuchJobExecutionException (javax.batch.operations.NoSuchJobExecutionException)2 FacesMessage (javax.faces.application.FacesMessage)2 TaggedJobExecution (com.ibm.jbatch.spi.TaggedJobExecution)1 HashMap (java.util.HashMap)1 TreeSet (java.util.TreeSet)1 TimeoutException (java.util.concurrent.TimeoutException)1 JobStartException (javax.batch.operations.JobStartException)1 NoSuchJobException (javax.batch.operations.NoSuchJobException)1 JobInstance (javax.batch.runtime.JobInstance)1 NamingException (javax.naming.NamingException)1 Query (javax.persistence.Query)1 DeploymentContextImpl (org.glassfish.deployment.common.DeploymentContextImpl)1 ApplicationInfo (org.glassfish.internal.data.ApplicationInfo)1