@Override
    public Timer createIntervalTimer(Date initialExpiration,
                                     long intervalDuration,
                                     TimerConfig timerConfig)
                    throws IllegalArgumentException, IllegalStateException, EJBException {

        final boolean isTraceOn = TraceComponent.isAnyTracingEnabled(); // F743-425.CodRev

        boolean persistent = (timerConfig == null ? true : timerConfig.isPersistent());
        Serializable info = (timerConfig == null ? (Serializable) null : timerConfig.getInfo());

        if (isTraceOn && tc.isEntryEnabled()) {
            Tr.entry(tc, "createIntervalTimer: " + initialExpiration + ", " +
                         intervalDuration + ": " + info + ", " + persistent, this); // F743-425.1
        }

        // Bean must implement TimedObject interface or have a timeout method to create a timer.
        if (!home.beanMetaData.isTimedObject) {

            IllegalStateException ise;

            ise = new IllegalStateException("Timer Service: Bean does not " +
                                            "implement TimedObject: " +
                                            beanId);
            if (isTraceOn && tc.isDebugEnabled()) {
                Tr.debug(tc, "createIntervalTimer: " + ise); // F743-425.1
            }

            throw ise;

        }

        // Determine if this bean is in a state that allows timer service
        // method access - throws IllegalStateException if not allowed.
        checkTimerServiceAccess();

        IllegalArgumentException iae = null;

        // Make sure the arguments are valid....
        if (initialExpiration == null ||
            initialExpiration.getTime() < 0)
        {
            iae = new IllegalArgumentException("TimerService: initialExpiration not " +
                                               "a valid value: " + initialExpiration);
        }
        else if (intervalDuration < 0)
        {
            iae = new IllegalArgumentException("TimerService: intervalDuration not " +
                                               "a valid value: " + intervalDuration);
        }

        if (iae != null)
        {
            if (isTraceOn && tc.isDebugEnabled())
                Tr.debug(tc, "createIntervalTimer: " + iae); // F743-425.1

            throw iae;
        }

        Timer timer = container.getEJBRuntime().createTimer(this, initialExpiration, intervalDuration, null, info, persistent); // F743-13022

        if (isTraceOn && tc.isEntryEnabled())
            Tr.exit(tc, "createIntervalTimer: " + timer); // F743-425.1

        return timer;
    }
@ Override public Timer createIntervalTimer ( Date initialExpiration , long intervalDuration , TimerConfig timerConfig ) throws IllegalArgumentException , IllegalStateException , EJBException { final boolean isTraceOn = TraceComponent . isAnyTracingEnabled ( ) ; boolean persistent = ( timerConfig == null ? true : timerConfig . isPersistent ( ) ) ; Serializable info = ( timerConfig == null ? ( Serializable ) null : timerConfig . getInfo ( ) ) ; if ( isTraceOn && tc . isEntryEnabled ( ) ) { Tr . entry ( tc , "createIntervalTimer: " + initialExpiration + ", " + intervalDuration + ": " + info + ", " + persistent , this ) ; } if ( ! home . beanMetaData . isTimedObject ) { IllegalStateException ise ; ise = new IllegalStateException ( "Timer Service: Bean does not " + "implement TimedObject: " + beanId ) ; if ( isTraceOn && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "createIntervalTimer: " + ise ) ; } throw ise ; } checkTimerServiceAccess ( ) ; IllegalArgumentException iae = null ; if ( initialExpiration == null || initialExpiration . getTime ( ) < 0 ) { iae = new IllegalArgumentException ( "TimerService: initialExpiration not " + "a valid value: " + initialExpiration ) ; } else if ( intervalDuration < 0 ) { iae = new IllegalArgumentException ( "TimerService: intervalDuration not " + "a valid value: " + intervalDuration ) ; } if ( iae != null ) { if ( isTraceOn && tc . isDebugEnabled ( ) ) Tr . debug ( tc , "createIntervalTimer: " + iae ) ; throw iae ; } Timer timer = container . getEJBRuntime ( ) . createTimer ( this , initialExpiration , intervalDuration , null , info , persistent ) ; if ( isTraceOn && tc . isEntryEnabled ( ) ) Tr . exit ( tc , "createIntervalTimer: " + timer ) ; return timer ; }
Create an interval timer whose first expiration occurs at a given
point in time and whose subsequent expirations occur after a
specified interval. <p>

@param initialExpiration The point in time at which the first timer
expiration must occur.
@param intervalDuration The number of milliseconds that must elapse
between timer expiration notifications.
Expiration notifications are scheduled relative
to the time of the first expiration. If expiration
is delayed(e.g. due to the interleaving of other
method calls on the bean) two or more expiration
notifications may occur in close succession to
"catch up".
@param timerConfig Wrapper of application information to be delivered along with the timer
expiration notification. Has indication of persistent vs NP.

@return The newly created Timer.

@exception IllegalArgumentException If initialExpiration is null, or
initialExpiration.getTime() is negative, or intervalDuration
is negative.
@exception IllegalStateException If this method is invoked while the
instance is in a state that does not allow access to this method.
@exception EJBException If this method fails due to a system-level failure.