I have the best practice:
From EJB 2.1, there's a timer service. You can create a Timer (can
repeat automatically with specified interval time) with it.
So, you should create an
EJB that implements TimedObject, in the method ejbTimeOut, send the email as you want. And
you could create a method to start a timer.
When the JBoss Application Server starts at the first time, the EJB can not be called
automatically, create a servlet and set it to load on startup(Just like what osterday
said), in the servlet call the EJB's method.
The auto-startup servlet should be setted to depends on the EJB, then JBoss will load the
EJB first.
Hope helpful!
Email: duy(a)routon.com
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3965940#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...