[jboss-user] [Installation, Configuration & Deployment] - Re: How to start the class when start up the jboss?

danialdy do-not-reply at jboss.com
Thu Aug 17 22:40:16 EDT 2006


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 at routon.com

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3965940#3965940

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3965940



More information about the jboss-user mailing list