• 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
  • Liutauras Vilda
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Junilu Lacar
  • Tim Cooke
Saloon Keepers:
  • Carey Brown
  • Stephan van Hulst
  • Tim Holloway
  • Peter Rooke
  • Himai Minh
Bartenders:
  • Piet Souris
  • Mikalai Zaikin

@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).
 
reply
    Bookmark Topic Watch Topic
  • New Topic