I got this package:
ApplicationEAR
--ModuleWeb.war
--ModuleBatch.jar
+--batch-jobs
+--mybatch.xml
--batch.xml
--ModuleJpa.jar
In .war
module there is a REST service I want to use to call mybatch.xml
job. Here is a bit of code:
JobOperator jo = BatchRuntime.getJobOperator();
long id = jo.start("mybatch", null);
When I call my service, I got this exception:
...
Caused by: java.lang.IllegalStateException: JBAS020560: BeanManager service was not added on the deployment. Ensure the deployment has a META-INF/batch.xml file or the META-INF/batch-jobs directory contains batch configuration files.
...
Do I have to change package structure? Does JobOperator
must be stick to batch
files and folder?