• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Timer questions

 
Ranch Hand
Posts: 577
Tomcat Server Notepad Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I'm going through Frits EJB3.1 spec summary document. I have come across some questions, if anybody can answer please.


1) How a TimerService provided by the Container be referenced using JNDI lookup? Or What is the JNDI name for TimerService?

2) Why stateful session beans can't have Timer Services?

3) Since timers are local objects, a TimerHandle must not be passed through a bean’s remote business interface, or web service interface. As TimerHandle is Serializable, can't I freely pass it over? What stops me to do this?

Cheers,
Naren
 
Creator of Enthuware JWS+ V6
Posts: 3411
320
Android Eclipse IDE Chrome
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Naren,

Naren Chivukula wrote:1) How a TimerService provided by the Container be referenced using JNDI lookup? Or What is the JNDI name for TimerService?


In the global JNDI: "java:comp/TimerService"

Naren Chivukula wrote:2) Why stateful session beans can't have Timer Services?


Because the specifications say stateful session beans do not support timers (however they might be introduced in a later version of the EJB specs)

Naren Chivukula wrote:3) Since timers are local objects, a TimerHandle must not be passed through a bean’s remote business interface, or web service interface. As TimerHandle is Serializable, can't I freely pass it over? What stops me to do this?
Cheers,
Naren


Nothing, but on the other side you can't do anything with the timer.

Regards,
Frits
 
Naren Chivukula
Ranch Hand
Posts: 577
Tomcat Server Notepad Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Spot on answers! Thanks very much Frits.

Cheers,
Naren
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic