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
762321
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();
        }
    }
1133116
public List<PersistenceContextRefType<ApplicationDescriptor>> getAllPersistenceContextRef()
   {
      List<PersistenceContextRefType<ApplicationDescriptor>> list = new ArrayList<PersistenceContextRefType<ApplicationDescriptor>>();
      List<Node> nodeList = model.get("persistence-context-ref");
      for(Node node: nodeList)
      {
         PersistenceContextRefType<ApplicationDescriptor>  type = new PersistenceContextRefTypeImpl<ApplicationDescriptor>(this, "persistence-context-ref", model, node);
         list.add(type);
      }
      return list;
   }
1094553
public java.util.List<MaintenanceWindowExecution> getWindowExecutions() {
        if (windowExecutions == null) {
            windowExecutions = new com.amazonaws.internal.SdkInternalList<MaintenanceWindowExecution>();
        }
        return windowExecutions;
    }
689642
@Override
    public List<JobDef> getJobDefinitions()
    {
        try
        {
            return target.path("jd").request().get(new GenericType<List<JobDef>>()
            {
            });
        }
        catch (Exception e)
        {
            throw new JqmClientException(e);
        }
    }
42221
@Override
	public int getCurrentlyExecutingAmount(JobKey jobKey) throws SchedulerException {
		List<JobExecutionContext> executingJobs = scheduler.getCurrentlyExecutingJobs();
		JobDetail jobDetail = scheduler.getJobDetail(jobKey);
		int numInstances = 0;
		for (JobExecutionContext jobExecutionContext : executingJobs) {
			JobDetail execJobDetail = jobExecutionContext.getJobDetail();
			if (execJobDetail.getKey().equals(jobDetail.getKey())) {
				if (LOGGER.isTraceEnabled()) 
					LOGGER.trace(String.format("found running job for jobkey: (%s, %s)", jobKey.getGroup(), jobKey.getName()));
				++numInstances;
			}
		}
		return numInstances;
	}
3806
public java.util.List<MaintenanceWindowExecutionTaskInvocationIdentity> getWindowExecutionTaskInvocationIdentities() {
        if (windowExecutionTaskInvocationIdentities == null) {
            windowExecutionTaskInvocationIdentities = new com.amazonaws.internal.SdkInternalList<MaintenanceWindowExecutionTaskInvocationIdentity>();
        }
        return windowExecutionTaskInvocationIdentities;
    }
127438
public void listRunningServices() {
        try {
            final List<String> formatedOutput =
                SecurityContext.executeWithSystemPermissions(new Callable<List<String>>() {
                    @Override
                    public List<String> call() throws Exception {
                        List<String> tmp = new ArrayList<String>();

                        List<ServiceReference<Domain>> listServiceReferences =
                            osgiUtilsService.listServiceReferences(Domain.class);
                        for (ServiceReference<Domain> ref : listServiceReferences) {
                            Domain service = bundleContext.getService(ref);
                            tmp.add(OutputStreamFormater.formatValues(
                                ref.getProperty(org.osgi.framework.Constants.SERVICE_PID).toString(), service
                                    .getAliveState().toString()));
                        }
                        return tmp;
                    }
                });
            for (String s : formatedOutput) {
                OutputStreamFormater.printValue(s);
            }
        } catch (ExecutionException ex) {
            ex.printStackTrace();
            System.err.println("Could not get services");
        }
    }
806977
public static void validatePersistedJobExecution(JobExecutionEntity execution) throws PersistenceException {

        if (execution.getExecutionId() <= 0) {

            long exId = execution.getExecutionId();

            PersistenceException e = new PersistenceException(new BatchIllegalIDPersistedException(Long.toString(exId)));
            logger.log(Level.SEVERE, "error.invalid.persisted.exe.id",
                       new Object[] { Long.toString(exId), e });

            throw e;
        }

    }
1116972
@Override
    public List<JobExecutionEntity> getJobExecutionsFromJobInstanceId(long jobInstanceId) throws NoSuchJobInstanceException {

        JobInstanceEntity instance = getJobInstance(jobInstanceId);
        List<JobExecutionEntity> executions = new ArrayList<JobExecutionEntity>(instance.getJobExecutions());

        // sorting could be optimized a bit but is it necessary for this impl?
        Collections.sort(executions, ReverseJobExecutionSequenceForOneInstanceComparator.INSTANCE);

        return executions;
    }
689424
public java.util.List<String> getTerminationPolicies() {
        if (terminationPolicies == null) {
            terminationPolicies = new com.amazonaws.internal.SdkInternalList<String>();
        }
        return terminationPolicies;
    }
912587
@Override
  public JobStatus getJobStatus(final JobId jobId) {
    final ZooKeeperClient client = provider.get("getJobStatus");

    final Job job = getJob(client, jobId);
    if (job == null) {
      return null;
    }

    final List<String> hosts;
    try {
      hosts = listJobHosts(client, jobId);
    } catch (JobDoesNotExistException e) {
      return null;
    }

    final ImmutableMap.Builder<String, Deployment> deployments = ImmutableMap.builder();
    final ImmutableMap.Builder<String, TaskStatus> taskStatuses = ImmutableMap.builder();
    for (final String host : hosts) {
      final TaskStatus taskStatus = getTaskStatus(client, host, jobId);
      if (taskStatus != null) {
        taskStatuses.put(host, taskStatus);
      }
      final Deployment deployment = getDeployment(host, jobId);
      if (deployment != null) {
        deployments.put(host, deployment);
      }
    }

    final Map<String, Deployment> deploymentsMap = deployments.build();
    return JobStatus.newBuilder()
        .setJob(job)
        .setDeployments(deploymentsMap)
        .setTaskStatuses(taskStatuses.build())
        .build();
  }
1126160
@Override
    public PersistenceUnitUtil getPersistenceUnitUtil()
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
            Tr.debug(tc, "getPersistenceUnitUtil : " + this);
        throw new UnsupportedOperationException("This operation is not supported on a pooling EntityManagerFactory.");
    }
723856
public synchronized List<SessionId> getLoggedSessions() {
    // TODO: Find a solution that can handle large numbers of sessions, maybe by
    // reading them from disc.
    ImmutableList.Builder<SessionId> builder = new ImmutableList.Builder<>();
    builder.addAll(perSessionDriverEntries.keySet());
    return builder.build();
  }
26518
public Map<String,Object> getServiceProperties()
    {
        Map<String,Object> properties = super.getServiceProperties();
        properties = addConfigProperty(properties, DBParams.LOCAL, DBParams.JDBC); // Remote Server ALWAYS uses Jdbc
        properties = addConfigProperty(properties, DBParams.REMOTE, DBParams.JDBC);
        properties = addConfigProperty(properties, DBParams.TABLE, DBParams.JDBC);
        properties = addConfigProperty(properties, Params.APP_NAME, Params.DEFAULT_REMOTE_APP);
        properties = addConfigProperty(properties, Params.MESSAGE_SERVER, DBConstants.TRUE);
        properties = addConfigProperty(properties, DBParams.FREEIFDONE, Constants.FALSE);   // Don't free when only the last app is running.
        properties = addConfigProperty(properties, MessageConstants.MESSAGE_FILTER, MessageConstants.TREE_FILTER);  // Default for a server
        return properties;
    }
805541
public static void validateStatusAtInstanceRestart(long jobInstanceId, Properties restartJobParameters) throws JobRestartException, JobExecutionAlreadyCompleteException {

        IPersistenceManagerService iPers = ServicesManagerStaticAnchor.getServicesManager().getPersistenceManagerService();
        WSJobInstance jobInstance = iPers.getJobInstance(jobInstanceId);

        Helper helper = new Helper(jobInstance, restartJobParameters);
        if (!StringUtils.isEmpty(jobInstance.getJobXml())) {
            helper.validateRestartableFalseJobsDoNotRestart();
        }
        helper.validateJobInstanceFailedOrStopped();
    }
839330
@Override
	public List<Object> getServices(Class<?> root,Class<?> transactionType){
		Map<Class<?>, List<Object>> map = mapBusinessProvider.get(root);
		if(map != null){
			List<Object> list = map.get(transactionType);
			if(list != null){
				return Collections.unmodifiableList(list);
			}
		}
		return null;
	}
364542
public List<JobExecutionInfo> queryAllJobs(QueryListType lookupType, int resultsLimit)
      throws RemoteInvocationException {
    JobExecutionQuery query = new JobExecutionQuery();
    query.setIdType(QueryIdTypeEnum.LIST_TYPE);
    query.setId(JobExecutionQuery.Id.create(lookupType));

    // Disable properties and task executions (prevents response size from ballooning)
    query.setJobProperties(ConfigurationKeys.JOB_RUN_ONCE_KEY + "," + ConfigurationKeys.JOB_SCHEDULE_KEY);
    query.setIncludeTaskExecutions(false);

    query.setLimit(resultsLimit);

    return executeQuery(query);
  }