You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by simon <si...@chello.at> on 2007/09/08 18:15:14 UTC

Re: [orchestra] Conversation Timeouts (was changed scope configuration)

Currently the config for a scope (from which a conversation inherits its
properties) looks like this:
  <bean class=".......orchestra.spring.SpringConversationScope>
    <property name="timeout" value="30"/>
  </bean>

If no timeout property is present, then no timeout applies.
Otherwise, the specified timeout applies.

It would be easy to instead say that if no timeout property is present
then the default applies. But how do you suggest a user then selects "no
timeout"?

Option 1:
A magic value like "-1"? Possible, but obscure I think.

Option 2:
To make the timeout property a string, which can contain either "no" or
a numeric value. This is just like the first option, except that a magic
word is used instead of a magic number.

Option 3: 
Another boolean property, "hasTimeout" which can be set to false? Also
possible, but it seems clumsy.

This configuration awkwardness was the main reason I changed the old
behaviour of having a default timeout of 30 mins - I couldn't see an
elegant way to have that *and* an elegant way for the user to disable
timeouts completely.

Are there any other alternatives?

BTW, When Mario originally said "the user must configure a timeout", he
meant that they must configure a timeout if they want one because a
timeout is no longer enabled by default.

Regards,

Simon
 
On Sat, 2007-09-08 at 11:46 +0200, Martin Marinschek wrote:
> Ok, yes, then - you got me right, and you know what side I'd lean to ;)
> 
> regards,
> 
> Martin
> 
> On 9/8/07, Mario Ivankovits <ma...@ops.co.at> wrote:
> > no no. I think you are right (if i understand you correctly). By default the conversation lives as long as the session which means a conversation can live far longer than just e.g. 30 min.
> > I'd admit I am also one of those who would like to see a default timeout happening, though others wont (e.g. See shale-dialog).
> > I am unsure about it..
> >
> > Lets fell a community decision.
> >
> > Mario
> >
> > -----Original Message-----
> > From: "Martin Marinschek" <ma...@gmail.com>
> > Date: Saturday, Sep 8, 2007 1:17 am
> > Subject: Re: [orchestra] changed scope configuration
> > To: Reply-    "MyFaces Development" <de...@myfaces.apache.org>To: "MyFaces Development" <de...@myfaces.apache.org>
> >
> > Ok, on rereading I see I did indeed take the wording wrongly. Sorry
> > >for the confusion.
> > >
> > >regards,
> > >
> > >Martin
> > >
> > >On 9/8/07, Martin Marinschek <ma...@gmail.com> wrote:
> > > Hi Zubin,
> > >
> > >> Mario specifically mentions that a setting HAS to be made - so I was
> > > wondering why we want to force users to do this, if it is not
> > > necessary. Might as well be that I understood his mail wrongly.
> > >
> > >> regards,
> > >
> > >> Martin
> > >
> > >> On 9/8/07, Zubin Wadia <zw...@gmail.com> wrote:
> > > > Martin,
> > > >
> > > > I think that's what is already happening. If nothing is set - the
> > > > conversation dies with the session.
> > > >
> > > > It used to be that it was hard-wired to last 30 mins.
> > > >
> > > > If a specific setting is made in the config, then it supercedes the default
> > > > which = session timeout.
> > > >
> > > > Cheers,
> > > >
> > > > Zubin
> > > >
> > > >
> > > > On 9/7/07, Martin Marinschek <ma...@gmail.com> wrote:
> > > > > Hi Simon,
> > > > >
> > > > > I would suspect the default should be same as session, and that the
> > > > > added value of Orchestra is that a conversation will time out if the
> > > > > session keeps being used, but only these conversation scoped beans are
> > > > > not used anymore. Configuration should be available, and it is good
> > > > > that it is, but my POV is a nice default value would be the session
> > > > > timeout.
> > > > >
> > > > > regards,
> > > > >
> > > > > Martin
> > > > >
> > > > > On 9/8/07, simon <si...@chello.at> wrote:
> > > > > > Hi,
> > > > > >
> > > > > > Conversations are stored in the session (indirectly). So when the http
> > > > > > session times out, the conversations automatically go too. The timeout
> > > > > > mentioned here is just in case you want conversations to time out more
> > > > > > quickly than the http session.
> > > > > >
> > > > > > Until recently this shorter timeout was hard-wired to 30 minutes. It is
> > > > > > now configurable via the scope declaration in the spring file. And as
> > > > > > Mario mentions, if you don't specify a timeout there the default is now
> > > > > > *no* timeout (ie timeout only when session goes).
> > > > > >
> > > > > > I hope that's what you were asking about..
> > > > > >
> > > > > > Kito, you might like to look at the new documentation added to the
> > > > > > website recently (esp. in core). It's still a work in progress but any
> > > > > > feedback on what's there so far would be very welcome..
> > > > > >
> > > > > > Regards,
> > > > > >
> > > > > > Simon
> > > > > >
> > > > > > On Fri, 2007-09-07 at 23:35 +0200, Martin Marinschek wrote:
> > > > > > > Hi Mario,
> > > > > > >
> > >
> >
> >
> 
>