users@jax-rs-spec.java.net

[jax-rs-spec users] Re: Asynchronous EJBs

From: Arun Gupta <arun.p.gupta_at_oracle.com>
Date: Wed, 27 Feb 2013 17:09:42 -0500

"continues processing the invocation on a separate thread of execution"
will be true for the entire method execution and thus
executeLongRunningOp and ar.resume will run in one thread. What makes
sure that executeLongRunningOp runs in a separate thread ? May be I'm
missing something obvious ;-)

Would also like clarification on Future vs void return type.

Arun

On 2/27/13 4:47 PM, Santiago Pericas-Geertsen wrote:
>
> On Feb 27, 2013, at 4:13 PM, Arun Gupta <arun.p.gupta_at_oracle.com
> <mailto:arun.p.gupta_at_oracle.com>> wrote:
>
>> Asynchronous EJBs can have method signature with "void" and "Future"
>> return type. Section 8.3 describes the behavior with "void" return
>> type. Is "Future" return type not permitted ?
>>
>> If permitted, how would the response be returned back to the client ?
>>
>> EJB spec says
>>
>> " When a client invokes an asynchronous method, the container returns
>> control to the client immediately and continues processing the
>> invocation on a separate thread of execution. Ejb.bo "
>>
>> The code sample indicates only executeLongRunningOp will run in a
>> separate thread and ar.resume in the application thread. How is that
>> expected to work ?
> What lead you to that conclusion? The execution of longRunningOp is
> completely done in another thread, so the calls to
> executeLongRunningOp and ar.resume are done on the that same thread.
>
> -- Santiago
>
>

-- 
http://twitter.com/arungupta
http://blogs.oracle.com/arungupta