use of org.apache.oozie.executor.jpa.BundleJobGetCoordinatorsJPAExecutor in project oozie by apache.
the class BundleJobXCommand method execute.
/* (non-Javadoc)
* @see org.apache.oozie.command.XCommand#execute()
*/
@Override
protected BundleJobBean execute() throws CommandException {
try {
JPAService jpaService = Services.get().get(JPAService.class);
BundleJobBean bundleJob = null;
if (jpaService != null) {
bundleJob = jpaService.execute(new BundleJobGetJPAExecutor(id));
List<CoordinatorJobBean> coordinators = jpaService.execute(new BundleJobGetCoordinatorsJPAExecutor(id));
bundleJob.setCoordJobs(coordinators);
} else {
LOG.error(ErrorCode.E0610);
}
return bundleJob;
} catch (XException ex) {
throw new CommandException(ex);
}
}
Aggregations