Hi,
Excuse me for interfering and potentially hijacking the thread, but since
you are talking about dynamic ServletContext configuration, could you
please take a look also at SERVLET_SPEC-157 [1]? Let me know if I should
open a new thread for that.
Regards,
Guillermo González de Agüero.
[1]
https://java.net/jira/browse/SERVLET_SPEC-157
On Wed, Jan 25, 2017 at 11:49 PM, Stuart Douglas <sdouglas_at_redhat.com>
wrote:
> On Wed, Jan 25, 2017 at 8:35 PM, Mark Thomas <markt_at_apache.org> wrote:
> > On 24/01/2017 06:04, Shing Wai Chan wrote:
> >>
> >>> On Jan 23, 2017, at 5:17 PM, Shing Wai Chan <shing.wai.chan_at_oracle.com>
> wrote:
> >>>
> >>> I am looking at the issue [1] of missing programmatic configuration
> API for <session-timeout>.
> >>> Under <session-config>, we have <session-timeout>, <cookie-config>,
> <tracking-mode>.
> >>> The other two are configurable from programmatic API.
> >>> So I suggest to add the following two API in ServletContext
> >>
> >> The following are some clarifications:
> >> The sessionTimeout below are in minutes.
> >>
> >>> public int getSessionTimeout();
> >>>
> >>> public void setSessionTimeout(int sessionTimeout);
> >>
> >> The #setSessionTimeout method can only be called before the
> ServletContext is initialized.
> >> It throws IllegalStateException - if this ServletContext has already
> been initialized
> >
> > +1
> >
> >>> In [1], it also mentioned the missing of programmatic API for
> <distributable>. I do not plan to add API for this unless there are
> interesting use cases.
> >
> > I'm not aware of specific requests for setDistributable(boolean) but
> > given we provide the other setters it seems odd to exclude this one just
> > because we can't think of a use case.
> >
> > If it was going to be a lot of effort to implement then I would agree it
> > makes sense not to add it but the implementation should be trivial.
> >
> > I think we should add programmatic API for <distributable>.
>
> This is a -1 from me for adding a setter for distributable.
>
> This is not really just a simple switch, from our implementation point
> of view this involves completely changing the session manager
> implementation, and potentially starting a distributed cache. Not sure
> if other implementations are similar but from our point of view this
> is a lot of work for something that we don't have a use case for.
>
> Stuart
>
> >
> > Mark
> >
> >
> >>>
> >>> Please let me know your comments.
> >>> Thanks.
> >>>
> >>> Shing Wai Chan
> >>>
> >>> [1] https://java.net/jira/browse/SERVLET_SPEC-70
> >>>
> >>
> >
>