users@jersey.java.net

Re: [Jersey] Async processing & https support

From: Sam Zang <sam.zang_at_kabira.com>
Date: Mon, 03 Aug 2009 01:38:06 -0700

Paul Sandoz wrote:
> Hi Sam,
>
>
> On Aug 2, 2009, at 3:09 AM, Sam Zang wrote:
>
>>
>> Hello,
>>
>> I am developing an application using Jersey.
>>
>> I would like to know if there is async processing support
>> in Jersey.
>>
>
> What type of support do you want?
>
> Comet support using Jersey is being defined in the Atmosphere project:
>
> http://atmosphere.dev.java.net
>
> Or do you require something a little simpler than comet that suspends
> a request until some work is complete to return the response? the
> latter is not currently supported in Jersey but it is something we can
> work on, and probably should reside in the Atmosphere project as well
> (to take advantage of the abstract suspend support across containers)
> and is probably quite simple to enable (when the Atmosphere expert
> returns back from holiday :-) ).
>
> There are also some improvements to the client side we can make for
> supporting async. requests (currently only Future is supported) via
> callbacks. More on this in a bit.
Paul,

I am thinking of the simpler case. My application does

@Path("/mypath")
public class MyResource {

        @POST
        @Consumes("application/json")
        @Produces("application/json")
        @Path("/checkcashing")
        public CheckCashingResponse checkcashing(CheckCashingRequest req)
        {
                ...
        }
}

The POST request may need to use remote resource
so it could take some time.

I am looking for a way to suspend the request and
resume it when the processing is done.

I will take a look at Atmosphere project in the mean time.
 
>
>
>> Also, I need to use SSL protocol. Does anyone have an example
>> to host Jersey in a web container that supports https?
>>
>
> There are two samples using Glassfish and Grizzly:
>
> http://download.java.net/maven/2/com/sun/jersey/samples/https-server-glassfish/1.1.1-ea/https-server-glassfish-1.1.1-ea-project.zip
>
>
> http://download.java.net/maven/2/com/sun/jersey/samples/https-clientserver-grizzly/1.1.1-ea/https-clientserver-grizzly-1.1.1-ea-project.zip
>
>
> Paul.

Thanks for the info.

Sam.