About Question enthuware.jwpv6.2.595 :
Moderators: Site Manager, fjwalraven
Re: About Question enthuware.jwpv6.2.595 :
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.!!
But I read, asyncContext.complete() or asyncContext.dispatch() brings an end to async processing.!!
-
- Site Admin
- Posts: 10388
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.jwpv6.2.595 :
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.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.!!
HTH,
Paul.
-
- Posts: 55
- Joined: Thu Jan 03, 2013 7:51 am
- Contact:
Re: About Question enthuware.jwpv6.2.595 :
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().
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().
-
- Posts: 9
- Joined: Mon Nov 04, 2013 7:49 am
- Contact:
Re: About Question enthuware.jwpv6.2.595 :
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?
-
- Site Admin
- Posts: 10388
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.jwpv6.2.595 :
Yes, that is true but it is a special case. The problem statement has now been updated to make it clear.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?
thank you for your feedback!
Paul.
-
- Posts: 32
- Joined: Wed Aug 28, 2013 6:12 am
- Contact:
Re: About Question enthuware.jwpv6.2.595 :
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.
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.
-
- Site Admin
- Posts: 10388
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.jwpv6.2.595 :
It says, "In which of the following cases an AsyncListener's methods may be invoked by the container?"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.
Seems ok to me. What am I missing?
-Paul.
-
- Posts: 32
- Joined: Wed Aug 28, 2013 6:12 am
- Contact:
Re: About Question enthuware.jwpv6.2.595 :
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".
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".

-
- Site Admin
- Posts: 10388
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.jwpv6.2.595 :
I think you are right. Your version sounds better
I have changed it.
thank you for your feedback!

thank you for your feedback!
Who is online
Users browsing this forum: No registered users and 14 guests