About Question enthuware.oce-ejbd.v6.2.558 :

Moderator: admin

Post Reply
Misha
Posts: 10
Joined: Thu Aug 09, 2012 1:32 am
Contact:

Re: About Question enthuware.oce-ejbd.v6.2.558 :

Post by Misha »

Shouldn't the timeOut(Timer t) method inside InfoX be annotated with @Timeout?

admin
Site Admin
Posts: 10034
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

Re: About Question enthuware.oce-ejbd.v6.2.558 :

Post by admin »

Misha wrote:Shouldn't the timeOut(Timer t) method inside InfoX be annotated with @Timeout?
No, because as the explanation notes, InfoX's timeout is not a timout method.

HTH,
Paul.
If you like our products and services, please help us by posting your review here.

crolip
Posts: 6
Joined: Mon Jun 16, 2014 9:47 am
Contact:

Re: About Question enthuware.oce-ejbd.v6.2.558 :

Post by crolip »

The code of the stateless session bean is not showed.
Could not one of its methods have the @timeout annotation?


I haven't thought that timeOut method of InfoX was a callback, I just have though that it was a normal method and that the stateless session bean would have the @timeout method.


Thank you.

admin
Site Admin
Posts: 10034
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

Re: About Question enthuware.oce-ejbd.v6.2.558 :

Post by admin »

Yes, that is what the explanation also says. Whichever method of the stateless session bean is annotated with @Timeout, that method will be invoked. That is why none of the options are correct.

HTH,
Paul
If you like our products and services, please help us by posting your review here.

selvehed
Posts: 9
Joined: Wed Feb 22, 2017 4:32 am
Contact:

Re: About Question enthuware.oce-ejbd.v6.2.558 :

Post by selvehed »

crolip wrote:The code of the stateless session bean is not showed.
Could not one of its methods have the @timeout annotation?
If the bean code (that's not showed) didn't have a @Timeout method OR implement TimedObject, then the statement:
Timer t = timerService.createTimer(60000, new InfoX("test"));
would fail and the container would discard the bean instance, right?
Since the question declares that "there is appropriate import and other statements" there MUST be a @Timeout or "implements TimedObject" in the hidden code, right?
Hopefully I'm starting to get the Timer-concept! =)

henrid
Posts: 31
Joined: Sun Oct 13, 2013 1:20 pm
Contact:

Re: About Question enthuware.oce-ejbd.v6.2.558 :

Post by henrid »

Of course this question is testing for the so-called timeOut() method not being a timeout callback. But the bean is lacking a @Timeout annotation or ejbTimeout() method. How can we assume that "other statements" include this, while it may be a real test on knowing this requirement?

admin
Site Admin
Posts: 10034
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

Re: About Question enthuware.oce-ejbd.v6.2.558 :

Post by admin »

please read the response just above your post.
If you like our products and services, please help us by posting your review here.

Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests