Package org.jboss.seam.cron.impl.scheduling.exception

Examples of org.jboss.seam.cron.impl.scheduling.exception.InternalException


                        log.trace("Executing original method in new thread for " + ctx.getMethod().getName());
                    }
                    invokedFromInterceptorInThread.set(Boolean.TRUE);
                    return ctx.proceed();
                } else {
                    throw new InternalException("The framework got into an illegal state while atempting to keep track of Interceptors around asynchronous method invocations. This is certainly a bug. Please file it in the SEAMCRON Jira with full stack trace");
                }
            }
        } else {

            // The interceptor around the backgrounded method invocation
View Full Code Here


        // This will be the basic form, with the result available immediately
        Object result;

        // housekeeping
        if (ic == null || ic.getMethod() == null) {
            throw new InternalException("Failed to provide an InvocationContext/method to this " + this.getClass().getName());
        }
       
        final Method method = ic.getMethod();
        if (log.isTraceEnabled()) {
            log.trace("Running Invocation Context for " + method.getName());
View Full Code Here

        if (lastTriggerSecond != null) {
            if (Math.abs(lastTriggerSecond.getEpochSeconds() - (newInstant.getEpochSeconds() - 40)) > tolleranceSeconds) {
                final String errorMessage = "Tick interval was not as per configuration. Previous tick was at " + lastTriggerSecond.getEpochSeconds()
                        + " and this one was at " + newInstant.getEpochSeconds();
                System.out.println("ERROR: " + errorMessage);
                errorDetected = new InternalException(errorMessage);
            }
        }
        lastTriggerSecond = newInstant;
    }
View Full Code Here

        int second = gc.get(Calendar.SECOND);
        System.out.println("Every Minute fired on second: " + second);
        if (second > tolleranceSeconds && second < (60 - tolleranceSeconds)) {
            final String errorMessage = "Minute tick did not fire on the minute (ie: at zero seconds). Instead it was fired at " + second + " seconds past the minute.";
            System.out.println("ERROR: " + errorMessage);
            errorDetected = new InternalException(errorMessage);
        }
    }
View Full Code Here

    public void testEvery40thSecond() throws Exception {
        try {
            // just fire up the bean and give it enough time to time itself and record any anomolies.
            Thread.sleep(LONG_SLEEP_TIME);
        } catch (InterruptedException ex) {
            throw new InternalException("Should not have been woken up here");
        }
        Assert.assertTrue(everyTestBean.isWas40SecondEventObserved());
        Assert.assertTrue(everyTestBean.isWasMinuteEventObserved());
        if (everyTestBean.getErrorDetected() != null) {
            throw everyTestBean.getErrorDetected();
View Full Code Here

TOP

Related Classes of org.jboss.seam.cron.impl.scheduling.exception.InternalException

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.