How do I create a non-persistent programmatic timer in EJB 2.1 using TimedObject?

116 Views Asked by At

I have looked up this question in many forums and the answers seem to apply only to EJB 3.1 with TimerConfig method.
Is there a similar way to create a nonpersistent timer for EJB 2?

1

There are 1 best solutions below

0
On BEST ANSWER

If you mean an application server that supports the EJB 3.1 API with an ejb-jar.xml file that contains version="2.1", then use TimerConfig.setPersistent as usual.

If you mean an application server that only supports the EJB 2 API, then no, there is no standard way to create a non-persistent timer. Instead, you will need to use a non-standard solution like CommonJ or WebSphere AsynchBeans.