• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Timer interface and stateful session beans

 
Mirko Bonasorte
Ranch Hand
Posts: 244
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Greetings,
I have a doubt about page 79 specs: here we can find that business methods for a Stateful session bean can invoke the Timer interface methods. But how can a stateful session bean have access to a Timer instance if it cannot be a TimedObject itself and cannot invoke TimerService interface?
Thanks in advances
 
Sergio Tridente
Ranch Hand
Posts: 329
Java Linux Oracle
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This one is tricky, I must confess. However, the specs are talking about Timer methods and not about TimerService methods.

I'll try to explain it with an example:


In the example above, a timer method (Timer.getInfo()) is called inside a Stateful bean's business method (MyStatefulBean.doSomething()).
 
nitin pai
Ranch Hand
Posts: 185
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Wow, Nice example Sergio.
 
Mirko Bonasorte
Ranch Hand
Posts: 244
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Gosh, I can't believe they were thinking about such a thing... I had excluded it, supposing that the specs were referring something more "reasonable".

Well, thanks a lot, my doubt is cleared!
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic