Package org.glassfish.api.admin.progress

Examples of org.glassfish.api.admin.progress.JobPersistence.persist()


            else  {
                jobPersistenceService = Globals.getDefaultHabitat().getService(JobPersistenceService.class);
            }

            List<String> userList =  SubjectUtil.getUsernamesFromSubject(subject);
            jobPersistenceService.persist(new JobInfo(id,commandName,executionDate,report.getActionExitCode().name(),userList.get(0),report.getMessage(),getJobsFile(),State.COMPLETED.name(),completionDate));
        }
        complete(report);
    }

    @Override
View Full Code Here


            else  {
                jobPersistenceService = Globals.getDefaultHabitat().getService(JobPersistenceService.class);
            }

            List<String> userList =  SubjectUtil.getUsernamesFromSubject(subject);
            jobPersistenceService.persist(new JobInfo(id,commandName,executionDate,report.getActionExitCode().name(),userList.get(0),report.getMessage(),getJobsFile(),State.COMPLETED.name(),completionDate));
        }
        complete(report);
    }

    @Override
View Full Code Here

        this.payload = outbound;
        complete(report);
        if (isManagedJob) {
            JobPersistence jobPersistenceService = Globals.getDefaultHabitat().getService(JobPersistenceService.class);
            List<String> userList =  SubjectUtil.getUsernamesFromSubject(subject);
            jobPersistenceService.persist(new JobInfo(id,commandName,executionDate,state.name(),"admin",report.getMessage()));
        }
    }

    @Override
    public long getCommandExecutionDate ()  {
View Full Code Here

        }
        this.payload = outbound;
        if (isManagedJob) {
            JobPersistence jobPersistenceService = Globals.getDefaultHabitat().getService(JobPersistenceService.class);
            List<String> userList =  SubjectUtil.getUsernamesFromSubject(subject);
            jobPersistenceService.persist(new JobInfo(id,commandName,executionDate,State.COMPLETED.name(),userList.get(0),report.getMessage()));
        }
        complete(report);
    }

    @Override
View Full Code Here

        this.payload = outbound;
        complete(report);
        if (isManagedJob) {
            JobPersistence jobPersistenceService = Globals.getDefaultHabitat().getService(JobPersistenceService.class);
            //todo fix user
            jobPersistenceService.persist(new JobInfo(id,commandName,executionDate,state.name(),"admin",report.getMessage()));
        }
    }

    @Override
    public long getCommandExecutionDate ()  {
View Full Code Here

            else  {
                jobPersistenceService = Globals.getDefaultHabitat().getService(JobPersistenceService.class);
            }

            List<String> userList =  SubjectUtil.getUsernamesFromSubject(subject);
            jobPersistenceService.persist(new JobInfo(id,commandName,executionDate,report.getActionExitCode().name(),userList.get(0),report.getMessage(),getJobsFile(),State.COMPLETED.name()));
        }
        complete(report);
    }

    @Override
View Full Code Here

            else  {
                jobPersistenceService = Globals.getDefaultHabitat().getService(JobPersistenceService.class);
            }

            List<String> userList =  SubjectUtil.getUsernamesFromSubject(subject);
            jobPersistenceService.persist(new JobInfo(id,commandName,executionDate,report.getActionExitCode().name(),userList.get(0),report.getMessage(),getJobsFile(),State.COMPLETED.name(),completionDate));
        }
        complete(report);
    }

    @Override
View Full Code Here

        }
        this.payload = outbound;
        if (isManagedJob) {
            JobPersistence jobPersistenceService = Globals.getDefaultHabitat().getService(JobPersistenceService.class);
            List<String> userList =  SubjectUtil.getUsernamesFromSubject(subject);
            jobPersistenceService.persist(new JobInfo(id,commandName,executionDate,State.COMPLETED.name(),"admin",report.getMessage()));
        }
        complete(report);
    }

    @Override
View Full Code Here

                }
                String user = null;
                if(subjectUsernames.size() > 0){
                    user = subjectUsernames.get(0);
                }
                jobPersistenceService.persist(new JobInfo(id,commandName,executionDate,report.getActionExitCode().name(),user,report.getMessage(),getJobsFile(),finalState.name(),completionDate));
                if (getState().equals(State.RUNNING_RETRYABLE) || getState().equals(State.REVERTING)) {
                    JobManagerService jobManager = Globals.getDefaultHabitat().getService(JobManagerService.class);
                    File jobFile = getJobsFile();
                    if (jobFile == null) {
                        jobFile = jobManager.getJobsFile();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.