aspose file tools*
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes Timer interface and stateful session beans Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "Timer interface and stateful session beans" Watch "Timer interface and stateful session beans" New topic
Author

Timer interface and stateful session beans

Mirko Bonasorte
Ranch Hand

Joined: May 14, 2007
Posts: 244
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


SCJP<br />SCWCD 1.4 Upgrade (Remember: me stupid)<br />SCWCD 1.4<br /><a href="http://jcp.org/aboutJava/communityprocess/final/jsr220/index.html" target="_blank" rel="nofollow">SCBCD 5.0</a><br /><a href="http://www.enthuware.com" target="_blank" rel="nofollow">SCBCD 5.0 mock exam</a> <br /> <br />SCEA 5 Part1: Preparing...
Sergio Tridente
Ranch Hand

Joined: Mar 22, 2007
Posts: 329

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()).


SCJP 1.4 (88%) - SCJP 5.0 Upgrade (93%) - SCWCD 1.4 (97%) - SCBCD 5.0 (98%)
nitin pai
Ranch Hand

Joined: May 30, 2006
Posts: 185
Wow, Nice example Sergio.



Mirko Bonasorte
Ranch Hand

Joined: May 14, 2007
Posts: 244
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
 
subject: Timer interface and stateful session beans
 
Similar Threads
Timer methods in stateful session beans
call session from other session
how many PrePassivate methods we can have in an stateful session bean ?
Why EJBTimer service not supporting in stateful beans
TimerService in EJB 3