Package org.quartz

Examples of org.quartz.ObjectAlreadyExistsException


    protected void storeCalendar(Connection conn, SchedulingContext ctxt,
            String calName, Calendar calendar, boolean replaceExisting, boolean updateTriggers)
            throws ObjectAlreadyExistsException, JobPersistenceException {
        try {
            boolean existingCal = calendarExists(conn, calName);
            if (existingCal && !replaceExisting) { throw new ObjectAlreadyExistsException(
                    "Calendar with name '" + calName + "' already exists."); }

            if (existingCal) {
                if (getDelegate().updateCalendar(conn, calName, calendar) < 1) { throw new JobPersistenceException(
                        "Couldn't store calendar.  Update failed."); }
View Full Code Here


        boolean repl = false;

        if (jobsByFQN.get(jw.key) != null) {
            if (!replaceExisting) {
                throw new ObjectAlreadyExistsException(newJob);
            }
            repl = true;
        }

        synchronized (triggerLock) {
View Full Code Here

            boolean replaceExisting) throws JobPersistenceException {
        TriggerWrapper tw = new TriggerWrapper((Trigger)newTrigger.clone());

        if (triggersByFQN.get(tw.key) != null) {
            if (!replaceExisting) {
                throw new ObjectAlreadyExistsException(newTrigger);
            }

            removeTrigger(ctxt, newTrigger.getName(), newTrigger.getGroup(), false);
        }
View Full Code Here

            Calendar calendar, boolean replaceExisting, boolean updateTriggers)
        throws ObjectAlreadyExistsException {
        Object obj = calendarsByName.get(name);

        if (obj != null && replaceExisting == false) {
            throw new ObjectAlreadyExistsException(
                "Calendar with name '" + name + "' already exists.");
        } else if (obj != null) {
            calendarsByName.remove(name);
        }
View Full Code Here

        boolean existingJob = jobExists(conn, newJob.getName(), newJob
                .getGroup());
        try {
            if (existingJob) {
                if (!replaceExisting) {
                    throw new ObjectAlreadyExistsException(newJob);
                }
                getDelegate().updateJobDetail(conn, newJob);
            } else {
                getDelegate().insertJobDetail(conn, newJob);
            }
View Full Code Here

        boolean existingTrigger = triggerExists(conn, newTrigger.getName(),
                newTrigger.getGroup());

        if ((existingTrigger) && (!replaceExisting)) {
            throw new ObjectAlreadyExistsException(newTrigger);
        }
       
        try {

            boolean shouldBepaused = false;
View Full Code Here

            String calName, Calendar calendar, boolean replaceExisting, boolean updateTriggers)
        throws ObjectAlreadyExistsException, JobPersistenceException {
        try {
            boolean existingCal = calendarExists(conn, calName);
            if (existingCal && !replaceExisting) {
                throw new ObjectAlreadyExistsException(
                    "Calendar with name '" + calName + "' already exists.");
            }

            if (existingCal) {
                if (getDelegate().updateCalendar(conn, calName, calendar) < 1) {
View Full Code Here

        boolean existingJob = jobExists(conn, newJob.getName(), newJob
                .getGroup());
        try {
            if (existingJob) {
                if (!replaceExisting) {
                    throw new ObjectAlreadyExistsException(newJob);
                }
                getDelegate().updateJobDetail(conn, newJob);
            } else {
                getDelegate().insertJobDetail(conn, newJob);
            }
View Full Code Here

        boolean existingTrigger = triggerExists(conn, newTrigger.getName(),
                newTrigger.getGroup());

        if ((existingTrigger) && (!replaceExisting)) {
            throw new ObjectAlreadyExistsException(newTrigger);
        }
       
        try {

            boolean shouldBepaused = false;
View Full Code Here

            String calName, Calendar calendar, boolean replaceExisting, boolean updateTriggers)
        throws ObjectAlreadyExistsException, JobPersistenceException {
        try {
            boolean existingCal = calendarExists(conn, calName);
            if (existingCal && !replaceExisting) {
                throw new ObjectAlreadyExistsException(
                    "Calendar with name '" + calName + "' already exists.");
            }

            if (existingCal) {
                if (getDelegate().updateCalendar(conn, calName, calendar) < 1) {
View Full Code Here

TOP

Related Classes of org.quartz.ObjectAlreadyExistsException

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.