Package org.glassfish.api.admin.progress

Examples of org.glassfish.api.admin.progress.JobInfos


     * and need to be purged
     * @return  list of jobs to be purged
     */
    public ArrayList<JobInfo> getExpiredJobs() {
        ArrayList<JobInfo> expiredJobs = new ArrayList<JobInfo>();
        JobInfos jobInfos = getCompletedJobs();
        for(JobInfo job:jobInfos.getJobInfoList()) {

            long executedTime = job.commandExecutionDate;
            long currentTime = System.currentTimeMillis();

            long jobsRetentionPeriod = 86400000;
View Full Code Here


        try {
            if (jaxbContext == null)
                jaxbContext = JAXBContext.newInstance(JobInfos.class);
            Unmarshaller unmarshaller = jaxbContext.createUnmarshaller();
            if (jobsFile != null && jobsFile.exists())  {
                JobInfos jobInfos = (JobInfos)unmarshaller.unmarshal(jobsFile);
                return jobInfos;
            }
        } catch (JAXBException e) {
            throw new RuntimeException(adminStrings.getLocalString("error.reading.completed.jobs","Error reading completed jobs ",  e.getLocalizedMessage()), e);
        }
View Full Code Here

            if (jobInfo.jobId.equals(jobId)) {
                jobList.remove(jobInfo);
            }

        }
        JobInfos jobInfos = new JobInfos();
        try {
            if (jaxbContext == null)
                jaxbContext = JAXBContext.newInstance(JobInfos.class);

            jobInfos.setJobInfoList(jobList);
            Marshaller jaxbMarshaller = jaxbContext.createMarshaller();
            jaxbMarshaller.marshal(jobInfos, jobsFile);
        } catch (JAXBException e) {
            throw new RuntimeException(adminStrings.getLocalString("error.purging.completed.job","Error purging completed job ", jobId,e.getLocalizedMessage()), e);
        }
View Full Code Here

TOP

Related Classes of org.glassfish.api.admin.progress.JobInfos

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.