|
Oracle® Containers for J2EE Enterprise JavaBeans Developer's Guide
10g Release 3 (10.1.3) B14428-01 |
|
![]() Previous |
![]() Next |
You can configure a J2EE timer on an EJB 3.0 stateless session bean or message-driven bean.
You can access the timer service using annotations and dependency injection (see "Using Annotations"), using the initial context API (see "Using Initial Context").
You can implement the timeout call back by:
annotating an existing method (see "Using Annotations")
by implementing the javax.ejb.TimedObjectinterface.
Example 25-1 shows how to use resource injection to acquire a J2EE timer in an EJB 3.0 EJB.
Example 25-2 shows how to use the initial context to look up a J2EE timer in an EJB 3.0 EJB.