It looks close to some features provided by atmosphere, in fact atmosphere
does support SSE transport.

Yes, I read somewhere it is going to be a CDI extension.

The interesting thing is what you can do with the CDI annotations. You can
very easily produce something like this:

@Startup
@Stateless
public class SimpleEvent {

 @Inject @ServerSentEventContext("/simple")
 ServerSentEventHandlerContext<MySimpleHandler> simpleHandlers;

 @Schedule(hour="*", minute="*", second="*/10")
 public void sendDate() {
 for(MySimpleHandler handler : simpleHandlers.getHandlers()) {
 handler.sendMessage(new Date().toString());
 }
 }
}

In case of Tomcat with WebSocket instead of MySimpleHandler we would have
something that extends MessageInbound and inside the for cycle
handler.getWsOutbound().writeTextMessage(...)


On Wed, Sep 5, 2012 at 12:40 PM, Romain Manni-Bucau
<[email protected]>wrote:

> Currently not but looks pretty close to atmosphere, no?
>
> Since it islinked to cdi it should be an extension to cdi and maybe not
> sthg brought by the container.
>
> Wdyt?
> Le 5 sept. 2012 11:03, "Luca Merolla" <[email protected]> a écrit :
>
> > An example is shown here:
> >
> >
> >
> http://weblogs.java.net/blog/bhaktimehta/archive/2012/04/21/server-sent-events-sample-glassfish
> >
> > On Wed, Sep 5, 2012 at 11:02 AM, Luca Merolla <[email protected]
> > >wrote:
> >
> > > Hi,
> > >
> > > I was just wondering if we have something similar to
> > @ServerSentEventContext
> > > annotation in TomEE.
> > > It would be nice to have it, combined with the fact that TomEE ships
> the
> > > latest Tomcat which does support WebSocket can be a very cool feature
> > IMHO.
> > >
> > > Luca
> > >
> >
> >
> >
> > --
> >    *Luca Merolla*
> > Management, Business & Technology Consultant
> >
> >
> >  <http://maps.google.com/maps?q=&hl=en>  *Mobile:* +393774569974
> > *Email:* [email protected]
> >  *http://nl.linkedin.com/in/lucamerolla*
> > *Blog <http://lucamerolla.wordpress.com>*
> >
> >
> > Merolla Consulting Limited
> >

Reply via email to