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