tag:blogger.com,1999:blog-30587633.post7753797756377443032..comments2022-04-26T03:37:19.740+05:30Comments on My Wiki: EJB3.1 TimerService in JBoss AS 6.0.0.M4Jaikiranhttp://www.blogger.com/profile/08503182723143814781noreply@blogger.comBlogger4125tag:blogger.com,1999:blog-30587633.post-7486047291731899222010-12-02T11:43:16.226+05:302010-12-02T11:43:16.226+05:30Jai,
One of the posters on the OTN forums had ...Jai,<br /><br /> One of the posters on the OTN forums had a jboss related Timer question. To put it in a sentence, the OP was unable to cancel a Timer on undeployment from a ServletContextListener because the ejbs were undeployed earlier before the contextDestroyed() had a chance to fire. Would like to hear your take on it. Here's the original link (http://forums.oracle.com/forums/thread.jspa?threadID=2137310&tstart=0). Btw it was cross posted on javaranch too :)<br /><br />cheers,<br />ram.Ram.noreply@blogger.comtag:blogger.com,1999:blog-30587633.post-90613989961865218342010-08-12T05:42:17.781+05:302010-08-12T05:42:17.781+05:30Thanks, Jaikiran.
Its funny that even researching ...Thanks, Jaikiran.<br />Its funny that even researching on the net i cant seem to find a good solution. <br /><br />The best solution seems to be if you have a front end and use deployment descriptor web.xml to load class on startup.<br /><br />But if you have a backend you seem to have to utilise servers own startup class. Jboss for example, you can trigger your events at JBoss startup by using ManagedBeans. Have to add entry of that MBean in jboss-service.xml. Developers have been using that to start schedular at startup.<br /><br />My enterprise app is deployed on weblogic tho.<br /><br />I just would have thought auto timers would have existed similar to executing a java apps main class in unix via crontab, or using @Schdeule annotation in ejb 3.1.Anonymoushttps://www.blogger.com/profile/11813611076479346243noreply@blogger.comtag:blogger.com,1999:blog-30587633.post-86648142127391086142010-08-07T15:20:35.836+05:302010-08-07T15:20:35.836+05:30Shavo, glad to hear you liked the article.
As for...Shavo, glad to hear you liked the article.<br /><br />As for your question about auto-timer like functionality in EJB3.0, you wouldn't be able to use it there. The EJB timerservice is EJB3.0 expects the timers to be created programatically through the timerservice API. As for Quartz, it's been a few years since I used it so don't really know the latest developments there. But I guess Quartz too would expect the timer to be created programatically. <br /><br />If you are looking for a JBoss specific way of achieving auto-timer like functionality prior to EJB3.1, then I guess the JBoss specific scheduler service might be of help to you. Here's some more details about it (Section 10.4) <a href="http://docs.jboss.org/jbossas/jboss4guide/r1/html/ch10.html" rel="nofollow">http://docs.jboss.org/jbossas/jboss4guide/r1/html/ch10.html</a>Jaikiranhttps://www.blogger.com/profile/08503182723143814781noreply@blogger.comtag:blogger.com,1999:blog-30587633.post-72677050170406975162010-08-05T05:04:13.189+05:302010-08-05T05:04:13.189+05:30Jaikiran, very good article. Question on ejb 3.0 t...Jaikiran, very good article. Question on ejb 3.0 tho, if i wanted to automate a method like the example in ejb 3.1 with @Schedule what is my options? Should i use quartz scheduler or can i use EJBTimer as my app only has backend so i cant invoke via front end.Anonymoushttps://www.blogger.com/profile/11813611076479346243noreply@blogger.com