Hi Sean,

I see..if I get this right however, not sure how you can have a pool of
threads that when done return a response to the calling client..don't you
need to somehow keep these connections open? (which would result in the
same client latency as with the AsyncResponse way)

Perhaps websockets could come in handy here.

Regards,
Savvas

On 31 October 2015 at 20:42, Sean Dawson <seandawson2...@gmail.com> wrote:

>
> Thanks for the reply.  I'd like the original call to return so the client
> can continue, but initiate processing a tangential action that takes some
> time.
>
> There are other ways to re-architect this better - but we need something
> fairly quick/simple for now.
>
> I'm considering putting in a thread pool watcher/executor for handling
> out-of-band requests. But if the extra thread is guaranteed to complete
> (which it has so far in testing), then that's unneeded currently.
>
>
>
> On Sat, Oct 31, 2015 at 2:00 PM, Savvas Andreas Moysidis <
> savvas.andreas.moysi...@gmail.com> wrote:
>
>> Hi Sean,
>>
>> If your goal is to process a request in a separate thread other than the
>> handler thread then (assuming you are using a JAX-RS 2.0 implementation)
>> the AsyncResponse API is probably the safest way of achieving that.
>>
>> Have a look at: https://jersey.java.net/documentation/latest/async.html
>>
>> HTH,
>> Savvas
>>
>>
>>
>>
>>
>> On 29 October 2015 at 21:22, Sean Dawson <seandawson2...@gmail.com>
>> wrote:
>>
>>>
>>> Hello,
>>>
>>> A general question if anyone here knows off-hand or could point me to an
>>> answer.  Perhaps it depends on the http client or server or whatever but....
>>>
>>> If I start a new Java thread in server code that handles a RestEasy
>>> call, does that new thread execute fully even if the original call has
>>> ended/returned?  Or does it get canceled/interrupted/etc?
>>>
>>> Thank you.
>>>
>>>
>>>
>>> ------------------------------------------------------------------------------
>>>
>>> _______________________________________________
>>> Resteasy-users mailing list
>>> Resteasy-users@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/resteasy-users
>>>
>>>
>>
>
------------------------------------------------------------------------------
_______________________________________________
Resteasy-users mailing list
Resteasy-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/resteasy-users

Reply via email to