Look deeper into 18.1.1:
anonymous wrote : The Timer object shown below is the EJB3 timer when you use the EJB3
dispatcher. For the default ScheduledThreadPoolExecutor, the returned object is Future
from the JDK. For the Quartz dispatcher, it returns QuartzTriggerHandle, which we will
discuss in the next section.
|
So you just need to declare your Method on the Interface to return this special object and
implement it that way:
a) A Future object (with default scheduler, java.util.concurent i think):
| public Future odradi(@Expiration
| Date date, @IntervalCron
| Long interval,@FinalExpiration Date kraj) {
| return whatever; // will be ignored
| }
|
b) acoording to this a Timer object for EJB3 (javax.ejb i think)Timers or
c) a QuartzTriggerHandle object
You will receive this object immidiatly and may sace it into Context, a map in an
Application scoped manager or whereever. With this Object you are able to stop the timed
call (I'm working with quartz and it just works)
Hope this is what helps you out,
Greetz GHad
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4086320#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...