jsr369-experts@servlet-spec.java.net

[jsr369-experts] Re: [servlet-spec users] Re: Request/Connection cancellation

From: Greg Wilkins <gregw_at_webtide.com>
Date: Thu, 7 Apr 2016 08:53:54 +1000

On 7 April 2016 at 08:40, Stuart Douglas <sdouglas_at_redhat.com> wrote:

> Should we create a JIRA issue to track this?


https://java.net/jira/browse/SERVLET_SPEC-156


>
> Stuart
>
> On Sun, Oct 18, 2015 at 11:06 AM, Greg Wilkins <gregw_at_webtide.com> wrote:
> >
> > On 17 October 2015 at 23:38, Stuart Douglas <sdouglas_at_redhat.com> wrote:
> >>
> >> This seems reasonable, but we should probably include some kind of
> thread
> >> safety warning in the docs. The listener will be invoked by a different
> >> thread to the one that is currently processing, so the end user must
> take
> >> care to make sure the listener/processing code is thread safe.
> >
> >
> > +1
> >
> >>
> >> I am also not convinced that ServletRequestListener is the best place
> for
> >> this. Likely only specific long running requests will need this
> >> functionality, and I think that is may make more sense for them to
> >> explicitly register a listener with the request.
> >
> >
> > I share this concern. Perhaps simplest to create a new Listener that
> has to
> > be explicitly set via ServletRequest#addListener on a particular request:
> >
> > interface ServletRequestCancellationListener
> > {
> > void cancelled(ServletRequestCancellationEvent e);
> > }
> >
> > Plus single method interfaces a sooo fashionable at the moment :)
> >
> >
> >
> > --
> > Greg Wilkins <gregw@webtide.com> CTO http://webtide.com
>



-- 
Greg Wilkins <gregw@webtide.com> CTO http://webtide.com