Page 1 of 1

Re: About Question enthuware.jwpv6.2.595 :

Posted: Sun Aug 12, 2012 11:42 am
by Presi Priya
D. If the Runnable passed to asyncContext.start(runnable), calls asyncContext.dispatch().

But I read, asyncContext.complete() or asyncContext.dispatch() brings an end to async processing.!!

Re: About Question enthuware.jwpv6.2.595 :

Posted: Sun Aug 12, 2012 8:22 pm
by admin
Presi Priya wrote:D. If the Runnable passed to asyncContext.start(runnable), calls asyncContext.dispatch().

But I read, asyncContext.complete() or asyncContext.dispatch() brings an end to async processing.!!
As per JavaDoc API documentation for dispatch: There can be at most one asynchronous dispatch operation per asynchronous cycle, which is started by a call to one of the ServletRequest#startAsync methods. Any attempt to perform an additional asynchronous dispatch operation within the same asynchronous cycle will result in an IllegalStateException.

HTH,
Paul.

Re: About Question enthuware.jwpv6.2.595 :

Posted: Fri Jan 18, 2013 5:35 am
by gurpreet_asrgndu
this is regarding the option 5 as said by presi priya

the asyncContext.dispatch() will dispatch the request , response to the target of the dispatch method. now when the target will complete execution say by completing its service method then the container automatically has to call AsyncContext.complete() method which will result in onComplete method of AsyncListener be called.

but still have a doubt what happens if the dispatched target again calls startAsync().

Re: About Question enthuware.jwpv6.2.595 :

Posted: Mon Nov 11, 2013 6:39 pm
by mtmmjava
In regards to the last alternative: as per my understanding of the specs, if the user sets AsyncContext#setTimeout to a negative value, no infinite loop will ever make it call onTimeout, don't you agree?

Re: About Question enthuware.jwpv6.2.595 :

Posted: Tue Nov 12, 2013 7:08 am
by admin
mtmmjava wrote:In regards to the last alternative: as per my understanding of the specs, if the user sets AsyncContext#setTimeout to a negative value, no infinite loop will ever make it call onTimeout, don't you agree?
Yes, that is true but it is a special case. The problem statement has now been updated to make it clear.

thank you for your feedback!
Paul.

Re: About Question enthuware.jwpv6.2.595 :

Posted: Sat Feb 15, 2014 6:00 am
by DesRenthuware
Hi.

Small typo:

"In which of the following cases an AsyncListener's...".

Think the "may" that comes later in the line has probably been moved around a bit...

Thanks.

Re: About Question enthuware.jwpv6.2.595 :

Posted: Sat Feb 15, 2014 8:59 pm
by admin
DesRenthuware wrote:Hi.

Small typo:

"In which of the following cases an AsyncListener's...".

Think the "may" that comes later in the line has probably been moved around a bit...

Thanks.
It says, "In which of the following cases an AsyncListener's methods may be invoked by the container?"
Seems ok to me. What am I missing?
-Paul.

Re: About Question enthuware.jwpv6.2.595 :

Posted: Sun Feb 16, 2014 8:22 am
by DesRenthuware
Hi Paul.

Maybe just an American/UK/South African language structure variance. Over my side of the world I would have expected the sentence to be something like:

"In which of the following cases may an AsyncListener's methods be invoked by the container?"

I initially assumed that the sentence may have been rephrased at some point and the placement of "may" was moved (It looked odd to me). It's impossible to cater to the whole worlds language variances, so if you are happy, just ignore me. ;)

Thanks.

PS: don't get me started on, "...he did fantastic". :D

Re: About Question enthuware.jwpv6.2.595 :

Posted: Sun Feb 16, 2014 8:49 am
by admin
I think you are right. Your version sounds better :) I have changed it.

thank you for your feedback!