我收到了这个包裹:
ApplicationEAR
--ModuleWeb.war
--ModuleBatch.jar
+--batch-jobs
+--mybatch.xml
--batch.xml
--ModuleJpa.jar
在.war
模块中,我想用一个REST服务来调用mybatch.xml
作业。这是一些代码:
JobOperator jo = BatchRuntime.getJobOperator();
long id = jo.start("mybatch", null);
当我致电我的服务时,我遇到了这个例外:
...
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.
...
我是否需要更改包装结构? JobOperator
必须坚持batch
个文件和文件夹吗?