Package com.gainmatrix.lib.business.exception

Examples of com.gainmatrix.lib.business.exception.SystemIntegrityException


            Trigger trigger = scheduler.getTrigger(triggerKey);
            if (trigger != null) {
                return true;
            }
        } catch (SchedulerException e) {
            throw new SystemIntegrityException("Fail to get trigger by key", e);
        }

        return false;
    }
View Full Code Here


        List<? extends Trigger> triggers;
        try {
            triggers = scheduler.getTriggersOfJob(jobKey);
        } catch (SchedulerException e) {
            throw new SystemIntegrityException("Fail to get triggers list", e);
        }

        for (Trigger trigger : triggers) {
            try {
                scheduler.unscheduleJob(trigger.getKey());
            } catch (SchedulerException e) {
                throw new SystemIntegrityException("Fail to unschedule quartz trigger", e);
            }
        }
    }
View Full Code Here

        Trigger trigger = createJobCronTrigger(jobId, cron, timeZoneId);

        try {
            scheduler.scheduleJob(trigger);
        } catch (SchedulerException e) {
            throw new SystemIntegrityException("Fail to schedule quartz job on job enabling", e);
        }
    }
View Full Code Here

            File derbyLogFile;
            try {
                derbyLogFile = File.createTempFile("derby", ".log");
                derbyLogFile.deleteOnExit();
            } catch (IOException e) {
                throw new SystemIntegrityException("Failed to create a temporary file", e);
            }

            System.setProperty(DERBY_LOG_PARAMETER, derbyLogFile.getAbsolutePath());
        }
    }
View Full Code Here

        TextTemplate textTemplate;

        try {
            textTemplate = textTemplateFactory.getTemplate(name, locale);
        } catch (TextTemplateException e) {
            throw new SystemIntegrityException("Template [" + name + "] is not found", e);
        }

        // Prepare model
        Map<String, Object> model = ImmutableMap.<String, Object>builder()
            .put("locale", locale)
            .put("timezone", timezone)
            .putAll(attributes)
            .build();

        // Render template
        String text;

        try {
            text = textTemplate.render(model);
        } catch (TextTemplateException e) {
            throw new SystemIntegrityException("Template [" + name + "] could not be rendered", e);
        }

        // Load subject
        String defaultSubject = messageSourceAccessor.getMessage("mail.subject.default",
            null, DEFAULT_SUBJECT, locale);
View Full Code Here

                LOGGER.error("Internal error while executing the job : " + scheduleExecution.getJob().getId(), e);
            } finally {
                scheduleExecution = executionManagementService.finishExecution(scheduleExecution.getId(), status);
            }
        } catch (AbstractServiceException e) {
            throw new SystemIntegrityException("Fail to finish execution", e);
        }

        return scheduleExecution;
    }
View Full Code Here

            boolean terminated = executorService.awaitTermination(POOL_SHUTDOWN_WAIT_MS, TimeUnit.MILLISECONDS);
            if (!terminated) {
                LOGGER.error("Executor service is not terminated");
            }
        } catch (InterruptedException e) {
            throw new SystemIntegrityException("Unexpected interruption", e);
        }

        // Check the result
        int succeedNodes = 0;
        boolean exception = false;
View Full Code Here

        try {
            actionDefinition = actionDefinitionMarshaller.unmarshall(actionIdentifier.getActionDefinitionClass(),
                definition);
        } catch (ActionDefinitionMarshallerException e) {
            throw new SystemIntegrityException("Fail to unmarshall definition", e);
        }

        // Search for action executor
        ActionExecutor actionExecutor = executors.get(actionIdentifier);
        if (actionExecutor == null) {
View Full Code Here

TOP

Related Classes of com.gainmatrix.lib.business.exception.SystemIntegrityException

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.