code: public List<JobExecutionEntity> getJobExecutionsRunningLocalToServer(PersistenceServiceUnit psu) {
  
          final EntityManager em = psu.createEntityManager();
          try {
              List<JobExecutionEntity> exec = new TranRequest<List<JobExecutionEntity>>(em) {
                  @Override
                  public List<JobExecutionEntity> call() throws Exception {
                      TypedQuery<JobExecutionEntity> query = em.createNamedQuery(JobExecutionEntity.GET_JOB_EXECUTIONS_BY_SERVERID_AND_STATUSES_QUERY,
                                                                                 JobExecutionEntity.class);
                      query.setParameter("serverid", batchLocationService.getServerId());
                      query.setParameter("status", RUNNING_STATUSES);
                      List<JobExecutionEntity> result = query.getResultList();
                      if (result == null) {
                          return new ArrayList<JobExecutionEntity>();
                      }
                      return result;
                  }
              }.runInNewOrExistingGlobalTran();
  
              return exec;
          } finally {
              em.close();
          }
      }
docs: This method is called during recovery processing.
  
  Note: This is not a method on {@link IPersistenceManagerService}, only on the JPA persistence impl
  
  @return List<JobExecutionEntity> of jobexecutions with a "running" status and this server's serverId