1

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?

bhattedon
  • 1,045
  • 9
  • 11

1 Answers1

1

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.

Brett Kail
  • 33,593
  • 2
  • 85
  • 90