jsr345-experts@ejb-spec.java.net

[jsr345-experts] Re: (EJB_SPEC-13) EJB 3.2 Lite Support for Asynchronous

From: Antonio Goncalves <antonio.goncalves_at_gmail.com>
Date: Fri, 30 Sep 2011 10:21:16 +0200

On Wed, Sep 28, 2011 at 20:42, Marina Vatkina <marina.vatkina_at_oracle.com>wrote:

> We have also @Suspend in JAX-RS that can't use Future return type as it'll
> block the client.
>
> Timeout:
> 1) I do not see asyncTimeout in @WebServlet - was it proposed and dropped?
>

Yes, you are right. I just checked servlet 3.0 final and this is what's
written :

*A.1 Changes since Servlet 3.0 Proposed Final*
*1. Re-factored some of the Async APIs - moved addAsyncListener to
AsyncContext and renamed it to addListener. Moved setAsyncTimeout to
AsyncContext and renamed it to setTimeout.*


>
> 2) What time period will it define?
> a) to cancel if not started, or
> b) cancel after running for that long, or
> c) cancel of a combination of a) and b) is too long?
> Anything other than a) might not be even possible in XA transactions.
>

You bring another point by mentioning XA transactions. If we take the
transaction service out of the EJBs and make it available to managed beans,
would that mean that managed bean will then be able to do XA transactions ?


>
> -marina
>
> Antonio Goncalves wrote:
>
>> No, asynch servlet does not really implement the comet style, it's just an
>> easy way to do asynchronous calls in a different thread. Like Pete I think
>> it's a shame to have different ways of doing asynchrnoy (asyncSupported =
>> true in Servlet and Asynchronous elsewhere)... but I'm sure there's a
>> reason. What asynch servlets also have is a timeout (asyncSupported = true,
>> asyncTimeout = 3000). It could also be interesting to have a timeout
>> attribute on @Asynchronous, what do you think ?
>>
>> On Tue, Sep 27, 2011 at 22:50, Rick Hightower <richardhightower_at_gmail.com<mailto:
>> richardhightower@**gmail.com <richardhightower_at_gmail.com>>> wrote:
>>
>> Well said. Not sure if the async Servlets is the same beast
>> though. Isn't that dealing with Comet type stuff?
>>
>>
>> On Tue, Sep 27, 2011 at 11:47 AM, Pete Muir
>> <pmuir_at_bleepbleep.org.uk <mailto:pmuir_at_bleepbleep.org.**uk<pmuir_at_bleepbleep.org.uk>>>
>> wrote:
>>
>> This, for me, makes it even more important. There is nothing a
>> developer hates more than learning 3 ways to do the same thing!
>>
>> On 27 Sep 2011, at 18:30, Marina Vatkina wrote:
>>
>> > I'm not sure it'll be straight forward to add support for
>> all managed beans - servlets and Web services already define
>> their own approach to an asynchronous processing...
>> >
>> > -marina
>> >
>> > Antonio Goncalves wrote:
>> >> Like Pete I would like to see @Asynchronous in managed beans.
>> >>
>> >>
>> >> On Tue, Sep 27, 2011 at 12:46, Pete Muir
>> <pmuir_at_bleepbleep.org.uk <mailto:pmuir_at_bleepbleep.org.**uk<pmuir_at_bleepbleep.org.uk>
>> >
>> <mailto:pmuir_at_bleepbleep.org.**uk <pmuir_at_bleepbleep.org.uk>
>> <mailto:pmuir_at_bleepbleep.org.**uk <pmuir_at_bleepbleep.org.uk>>>>
>> wrote:
>> >>
>> >> I would like to see this too. However I see this only as
>> a first
>> >> step and would also like to add this to the list of
>> services to
>> >> extract entirely so they can be used in managed beans
>> (similar to
>> >> interceptors and our discussions around declarative
>> transactions).
>> >>
>> >> Pete
>> >>
>> >> On 27 Sep 2011, at 02:19, Marina Vatkina wrote:
>> >>
>> >> > This was also voted for by 2 experts. Would anybody
>> else like to
>> >> see this change in EJB 3.2?
>> >> >
>> >> > thanks,
>> >> > -marina
>> >>
>> >>
>> >>
>> >>
>> >> --
>> >> Antonio Goncalves
>> >> Software architect and Java Champion
>> >>
>> >> Web site <http://www.antoniogoncalves.**org<http://www.antoniogoncalves.org>>
>> | Twitter
>> <http://twitter.com/agoncal> | Blog
>> <http://feeds.feedburner.com/**AntonioGoncalves<http://feeds.feedburner.com/AntonioGoncalves>>
>> | LinkedIn
>> <http://www.linkedin.com/in/**agoncal<http://www.linkedin.com/in/agoncal>>
>> | Paris JUG
>> <http://www.parisjug.org>
>>
>>
>>
>>
>> -- *Rick Hightower*
>> (415) 968-9037 <tel:%28415%29%20968-9037>
>> Profile <http://www.google.com/**profiles/RichardHightower<http://www.google.com/profiles/RichardHightower>>
>>
>>
>>
>>
>> --
>> Antonio Goncalves
>> Software architect and Java Champion
>>
>> Web site <http://www.antoniogoncalves.**org<http://www.antoniogoncalves.org>>
>> | Twitter <http://twitter.com/agoncal> | Blog <
>> http://feeds.feedburner.com/**AntonioGoncalves<http://feeds.feedburner.com/AntonioGoncalves>>
>> | LinkedIn <http://www.linkedin.com/in/**agoncal<http://www.linkedin.com/in/agoncal>>
>> | Paris JUG <http://www.parisjug.org>
>>
>


-- 
Antonio Goncalves
Software architect and Java Champion
Web site <http://www.antoniogoncalves.org> |
Twitter<http://twitter.com/agoncal>|
Blog <http://feeds.feedburner.com/AntonioGoncalves> |
LinkedIn<http://www.linkedin.com/in/agoncal>| Paris
JUG <http://www.parisjug.org>