@jws:timer Tag

Specifies configuration attributes for a Timer control.

# Syntax

    @jws:timer

        [timeout="timeSpecification"]

        [repeats-every="timeSpecification"]

        [coalesce-events="true" | "false"]

# Attributes

These attributes determine the default behavior of the Timer control. The Timer control may be configured during its lifetime by calling methods of the TimerContol class. To learn more about the TimerControl class, see TimerControl Class.

timeout

Optional. Specifies the time between a call to the Timer control's start or restart method and the Timer control's first onTimeout callback. When the timer expires, the Timer control's onTimeout callback is called.

The timeout attribute expects a relative time specification. For example, "1 second". Specification of an absolute time as the value of the timeout attribute is not supported. Absolute time may only be specified by calling the TimerControl.setTimeoutAt method.

To learn how to specify values for the timeout attribute, see Specifying Time on a Timer Control.

Default: "0 sec". The timer will fire immediately after being started.

repeats-every

Optional. Specifies the interval between subsequent firings of the Timer control after the first expiration. If a valid interval greater than "0 seconds" is specified, the Timer control will continue firing at that interval until stopped.

The repeats-every attribute expects a relative time specification. For example, "1 second". Specification of an absolute time as the value of the repeats-every attribute is not supported.

To learn how to specify values for the repeats-every attribute, see Specifying Time on a Timer Control.

Default: "0 sec". The timer will fire once (at the time specified by the timeout attribute) but will never fire again.

coalesce-events

Optional. Specifies whether multiple undelivered firing events of a Timer control are delivered as a single onTimeout or as separate callbacks. At times, a Timer control may be unable to deliver one or more callbacks to its referring service. This may occur because the referring service is busy or because high system load delays delivery. A set of undelivered callbacks may accumulate. If the coalesce-events attribute is true, these accumulated callbacks are collapsed into a single callback when the service becomes available. If coalesce-events is false, the accumulated callbacks are delivered individually.

Default: "false".

# Remarks

The following rules apply to this tag's use:

- The @jws:timer tag may only occur on an declaration of an object of type weblogic.jws.control.TimerControl or of a type that extends TimerControl.

- The @jws:timer tag is typically found on declaration that also carry the @jws:control tag.

A Timer control callback will never interrupt the current thread of execution of a web service operation (a method marked with the @jws:operation tag). If a Timer control expires during execution of a web service operation, the onTimeout callback will be invoked immediately after the current web service operation completes.

Related Topics

Timer Control: Using Timers in Your Web Service

Controls: Using Resources from a Web Service