According to the EJB 3.1 specification, automatic timers can be configured through annotations or through the ejb-jar.xml
deployment descriptor.
18.2.2 Automatic Timer Creation
The Timer Service supports the
automatic creation of a timer based on
metadata in the bean class or
deployment descriptor. This allows the bean developer to schedule a timer
without relying on a bean invocation
to programmatically invoke one of the
Timer Service timer creation methods.
Automatically created timers are
created by the container as a result
of application deployment.
And my understanding of the deployment descriptor XLM schema is that you define it using a <timer>
element inside a <session>
element.
<xsd:element name="timer"
type="javaee:timerType"
minOccurs="0"
maxOccurs="unbounded"/>
See the definition of the timerType
complex type for the details (in particular the schedule
and timeout-method
elements).
References
- EJB 3.1 Specification
- Section 18.2.2 "Automatic Timer Creation"
- Section 19.5 "Deployment Descriptor XML Schema" (p. 580, p583-p584)