Win a copy of Fixing your Scrum this week in the Agile forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Rob Spoor
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Junilu Lacar
  • Tim Cooke
Saloon Keepers:
  • Tim Holloway
  • Piet Souris
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Frits Walraven
  • Himai Minh

@Timeout and the EJB3 Timer Service

 
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In all online examples about EJB3 Timer Service is the Timeout function wroten in the same Bean class which calles createTimer(). I think, there is no parameter about Timeout class in the overloaded createTimer() functions, so that means the Timeout implementation MUST be wroten in the same class, which calls timerservice.createTimer()? Btw, there must be MAX. only one Timeout implementation, right?

thanks
 
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Cainiao Zou wrote:In all online examples about EJB3 Timer Service is the Timeout function wroten in the same Bean class which calles createTimer(). I think, there is no parameter about Timeout class in the overloaded createTimer() functions, so that means the Timeout implementation MUST be wroten in the same class, which calls timerservice.createTimer()?



A EJB timerservice is associated with a EJB class. When the timerservice is used to create a timer, the timeout method is looked for in the same EJB class to which that timerservice belongs.

Btw, there must be MAX. only one Timeout implementation, right?


You can have a single action timer (which fires only once) and a recurring timer (which fires multiple times, based on the schedule that you use while creating it).
 
First, you drop a couch from the plane, THEN you surf it. Here, take this tiny ad with you:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic