use of org.jboss.shrinkwrap.api.spec.WebArchive in project javaee7-samples by javaee-samples.
the class BatchDecisionTest method createDeployment.
/**
* We're just going to deploy the application as a +web archive+. Note the inclusion of the following files:
*
* [source,file]
* ----
* /META-INF/batch-jobs/myJob.xml
* ----
*
* The +myJob.xml+ file is needed for running the batch definition.
*/
@Deployment
public static WebArchive createDeployment() {
WebArchive war = ShrinkWrap.create(WebArchive.class).addClass(BatchTestHelper.class).addPackage("org.javaee7.batch.decision").addAsWebInfResource(EmptyAsset.INSTANCE, ArchivePaths.create("beans.xml")).addAsResource("META-INF/batch-jobs/myJob.xml");
System.out.println(war.toString(true));
return war;
}
use of org.jboss.shrinkwrap.api.spec.WebArchive in project javaee7-samples by javaee-samples.
the class BatchFlowTest method createDeployment.
/**
* We're just going to deploy the application as a +web archive+. Note the inclusion of the following files:
*
* [source,file]
* ----
* /META-INF/batch-jobs/myJob.xml
* ----
*
* The +myJob.xml+ file is needed for running the batch definition.
*/
@Deployment
public static WebArchive createDeployment() {
WebArchive war = ShrinkWrap.create(WebArchive.class).addClass(BatchTestHelper.class).addPackage("org.javaee7.batch.flow").addAsWebInfResource(EmptyAsset.INSTANCE, ArchivePaths.create("beans.xml")).addAsResource("META-INF/batch-jobs/myJob.xml");
System.out.println(war.toString(true));
return war;
}
use of org.jboss.shrinkwrap.api.spec.WebArchive in project javaee7-samples by javaee-samples.
the class ManagedScheduledBatchTest method createDeployment.
/**
* We're just going to deploy the application as a +web archive+. Note the inclusion of the following files:
*
* [source,file]
* ----
* /META-INF/batch-jobs/myJob.xml
* ----
*
* The +myJob.xml+ file is needed for running the batch definition. We are also adding an alternative bean to
* override the created batch instance do we can track it's status and the modified batch instance.
*
* include::MyJobAlternative[]
*
* include::MyManagedScheduledBatchAlternative[]
*/
@Deployment
public static WebArchive createDeployment() {
BeansDescriptor beansXml = Descriptors.create(BeansDescriptor.class);
WebArchive war = ShrinkWrap.create(WebArchive.class).addClasses(MyBatchlet.class, MyJob.class, MyJobAlternative.class, MyManagedScheduledBatch.class, MyManagedScheduledBatchBean.class, MyManagedScheduledBatchAlternative.class).addAsWebInfResource(new StringAsset(beansXml.getOrCreateAlternatives().clazz(MyManagedScheduledBatchAlternative.class.getName()).up().exportAsString()), beansXml.getDescriptorName()).addAsResource("META-INF/batch-jobs/myJob.xml");
System.out.println(war.toString(true));
return war;
}
use of org.jboss.shrinkwrap.api.spec.WebArchive in project javaee7-samples by javaee-samples.
the class BatchSplitTest method createDeployment.
/**
* We're just going to deploy the application as a +web archive+. Note the inclusion of the following files:
*
* [source,file]
* ----
* /META-INF/batch-jobs/myJob.xml
* ----
*
* The +myJob.xml+ file is needed for running the batch definition.
*/
@Deployment
public static WebArchive createDeployment() {
WebArchive war = ShrinkWrap.create(WebArchive.class).addClass(BatchTestHelper.class).addPackage("org.javaee7.batch.split").addAsWebInfResource(EmptyAsset.INSTANCE, ArchivePaths.create("beans.xml")).addAsResource("META-INF/batch-jobs/myJob.xml");
System.out.println(war.toString(true));
return war;
}
use of org.jboss.shrinkwrap.api.spec.WebArchive in project javaee7-samples by javaee-samples.
the class BatchListenersTest method createDeployment.
/**
* We're just going to deploy the application as a +web archive+. Note the inclusion of the following files:
*
* [source,file]
* ----
* /META-INF/batch-jobs/myJob.xml
* ----
*
* The +myJob.xml+ file is needed for running the batch definition.
*/
@Deployment
public static WebArchive createDeployment() {
WebArchive war = ShrinkWrap.create(WebArchive.class).addClass(BatchTestHelper.class).addPackage("org.javaee7.batch.batch.listeners").addAsWebInfResource(EmptyAsset.INSTANCE, ArchivePaths.create("beans.xml")).addAsResource("META-INF/batch-jobs/myJob.xml");
System.out.println(war.toString(true));
return war;
}
Aggregations