tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Soto <asot...@gmail.com>
Subject Re: non blocking i/o and async servlets (servlet 3.1)
Date Fri, 25 Jul 2014 17:03:09 GMT
Well it was a simple HelloWorldServlet which creates an asyncContext, get a
writer from response and prints "Hello World".

it was something like:

public void doGet(HttpServletRequest request, HttpServletResponse response)
 throws ...{

AsyncContext ac = request.startAsync(request, response);
ac.start(()-> {
ac.getResponse().getWriter().println("Hello World");
});
}

Hope this helps but it was as simple as this.

I was using Tomee 1.7 and Java 8



2014-07-25 18:03 GMT+02:00 Vamsee Lakamsani <vamsee@yahoo.com.invalid>:

> Hi Alex, are you able to share that demo via some git repo?
>
>
> ________________________________
>  From: Alex Soto <asotobu@gmail.com>
> To: "users@tomee.apache.org" <users@tomee.apache.org>
> Sent: Thursday, July 24, 2014 11:21 PM
> Subject: Re: non blocking i/o and async servlets (servlet 3.1)
>
>
> Yes I tried yesterday in a demo and it worked. You won't have jax-rs async
> support since Apache cxf3 is integrated but for Servlet no problem at all.
>
>
>
>
>
> 2014-07-25 7:37 GMT+02:00 Romain Manni-Bucau <rmannibucau@gmail.com>:
>
> > Depend which parts but async context is in ee 6 and already helps a lot
> > regarding it.
> >  Le 25 juil. 2014 06:26, "Vamsee Lakamsani" <vamsee@yahoo.com.invalid> a
> > écrit :
> >
> > > http://docs.oracle.com/javaee/7/tutorial/doc/servlets013.htm
> > >
> > >
> > > Is it possible to do the above by adding "some" EE 7 jars to TomEE 1.6
> or
> > > 1.7 or is it only possible when TomEE 2.0 arrives later this year with
> > > Tomcat8 in it?
> > >
> >
>
>
>
> --
> +----------------------------------------------------------+
>   Alex Soto Bueno - Computer Engineer
>   www.lordofthejars.com
>
> +----------------------------------------------------------+




-- 
+----------------------------------------------------------+
  Alex Soto Bueno - Computer Engineer
  www.lordofthejars.com
+----------------------------------------------------------+

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message