You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Steve Ronderos <st...@ni.com> on 2008/12/12 20:40:14 UTC

Configure ConversationContext timeout in Orchestra

Hello Users,

I've looked around for documentation on how to override the 30 minute time 
out default that is set for ConversationContext in Orchestra. 

I'm able to configure the Conversation timeout fine for both 
conversation.access and conversation.manual, but I have been unable to 
find the configuration for ConversationContexts.

Does anyone know how I can configure this setting?

Thanks,

Steve Ronderos

Re: Configure ConversationContext timeout in Orchestra

Posted by Steve Ronderos <st...@ni.com>.
Simon,

We need to reduce the timeout.  Unfortunately we are using the attributes 
of ConversationContext to store some values.  These are not being cleaned 
up until the ConversationContext times out, since the 
ConversationWiperThread hangs on to references to the ConversationContexs 
(via ConversationManager).  Thanks for creating an issue report.

Jacob,

Unfortunately we currently use ConversationContext.setAttribute to store 
some data.  We are trying to move away from this practice, it would be 
easier and faster to configure the timeout on ConversationContext than to 
refactor the code.

Thanks,

Steve Ronderos



From:
Simon Kitching <sk...@apache.org>
To:
users@myfaces.apache.org
Date:
12/15/2008 02:14 AM
Subject:
Re: Configure ConversationContext timeout in Orchestra




Hi Steve,

I've double-checked, and it does indeed look like there is no way to
configure the ConversationContext timeout.

Do you want to *increase* or *reduce* the default timeout?

If you are looking at reducing the timeout then I would mostly agree with
Jacob: setting the ConversationContext timeout is not usually very
important. The ConversationManager (which holds the ConversationContexts) 
is
in the http-session, so as soon as the session times out all this data 
goes.
This is normally sufficient. And a ConversationContext object itself 
doesn't
take up much memory; the Conversation objects held in it do, but they 
*will*
time out and be removed.

There are two cases in which reducing the context timeout is mildly 
useful:
(i) when a webapp only uses Orchestra in a few not-often-used parts. In 
this
case, the session will stay alive while the user is active in other parts 
of
the app.
(ii) when a user has opened multiple browser windows, does some
orchestra-relatde requests then closes some browser windows. In this case,
there is (or should be) a separate context per windows, but the ones for 
the
closed windows will continue to exist until the (non-configurable) timeout
(or the http session expires).

If you want to *increase* the timeout, so data doesn't get discarded when
the user is inactive then this is trickier. I would suggest using 
javascript
or meta-tags in the generated html page to do periodic "pings" of the
server; this is a more general solution to http session timeouts that I
often use. It ensures that the http session remains alive for as long as 
the
browser is open, regardless of the http session timeout selected.

Despite the above, there really *should* be a configuration option for 
this,
so I have created issue 
  http://issues.apache.org/jira/browse/ORCHESTRA-33

Regards,
Simon


Jacob Mathew-2 wrote:
> 
> What is the motivation for setting a timeout for the context? Ultimately
> you
> are interested in the deletion of beans in a conversation right? Can you
> not
> achieve that by setting the timeouts on the conversations directly? 
Every
> bean in a conversationContext is inside a conversation...
> -Jacob
> 
> On Fri, Dec 12, 2008 at 11:40 AM, Steve Ronderos
> <st...@ni.com>wrote:
> 
>>
>> Hello Users,
>>
>> I've looked around for documentation on how to override the 30 minute
>> time
>> out default that is set for ConversationContext in Orchestra.
>>
>> I'm able to configure the Conversation timeout fine for both
>> conversation.access and conversation.manual, but I have been unable to
>> find
>> the configuration for ConversationContexts.
>>
>> Does anyone know how I can configure this setting?
>>
>> Thanks,
>>
>> Steve Ronderos
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Configure-ConversationContext-timeout-in-Orchestra-tp20982286p21009794.html

Sent from the MyFaces - Users mailing list archive at Nabble.com.




Re: Configure ConversationContext timeout in Orchestra

Posted by Simon Kitching <sk...@apache.org>.
Hi Steve,

I've double-checked, and it does indeed look like there is no way to
configure the ConversationContext timeout.

Do you want to *increase* or *reduce* the default timeout?

If you are looking at reducing the timeout then I would mostly agree with
Jacob: setting the ConversationContext timeout is not usually very
important. The ConversationManager (which holds the ConversationContexts) is
in the http-session, so as soon as the session times out all this data goes.
This is normally sufficient. And a ConversationContext object itself doesn't
take up much memory; the Conversation objects held in it do, but they *will*
time out and be removed.

There are two cases in which reducing the context timeout is mildly useful:
(i) when a webapp only uses Orchestra in a few not-often-used parts. In this
case, the session will stay alive while the user is active in other parts of
the app.
(ii) when a user has opened multiple browser windows, does some
orchestra-relatde requests then closes some browser windows. In this case,
there is (or should be) a separate context per windows, but the ones for the
closed windows will continue to exist until the (non-configurable) timeout
(or the http session expires).

If you want to *increase* the timeout, so data doesn't get discarded when
the user is inactive then this is trickier. I would suggest using javascript
or meta-tags in the generated html page to do periodic "pings" of the
server; this is a more general solution to http session timeouts that I
often use. It ensures that the http session remains alive for as long as the
browser is open, regardless of the http session timeout selected.

Despite the above, there really *should* be a configuration option for this,
so I have created issue 
  http://issues.apache.org/jira/browse/ORCHESTRA-33

Regards,
Simon


Jacob Mathew-2 wrote:
> 
> What is the motivation for setting a timeout for the context? Ultimately
> you
> are interested in the deletion of beans in a conversation right? Can you
> not
> achieve that by setting the timeouts on the conversations directly? Every
> bean in a conversationContext is inside a conversation...
> -Jacob
> 
> On Fri, Dec 12, 2008 at 11:40 AM, Steve Ronderos
> <st...@ni.com>wrote:
> 
>>
>> Hello Users,
>>
>> I've looked around for documentation on how to override the 30 minute
>> time
>> out default that is set for ConversationContext in Orchestra.
>>
>> I'm able to configure the Conversation timeout fine for both
>> conversation.access and conversation.manual, but I have been unable to
>> find
>> the configuration for ConversationContexts.
>>
>> Does anyone know how I can configure this setting?
>>
>> Thanks,
>>
>> Steve Ronderos
> 
> 

-- 
View this message in context: http://www.nabble.com/Configure-ConversationContext-timeout-in-Orchestra-tp20982286p21009794.html
Sent from the MyFaces - Users mailing list archive at Nabble.com.


Re: Configure ConversationContext timeout in Orchestra

Posted by Jacob Mathew <ja...@gmail.com>.
What is the motivation for setting a timeout for the context? Ultimately you
are interested in the deletion of beans in a conversation right? Can you not
achieve that by setting the timeouts on the conversations directly? Every
bean in a conversationContext is inside a conversation...
-Jacob

On Fri, Dec 12, 2008 at 11:40 AM, Steve Ronderos <st...@ni.com>wrote:

>
> Hello Users,
>
> I've looked around for documentation on how to override the 30 minute time
> out default that is set for ConversationContext in Orchestra.
>
> I'm able to configure the Conversation timeout fine for both
> conversation.access and conversation.manual, but I have been unable to find
> the configuration for ConversationContexts.
>
> Does anyone know how I can configure this setting?
>
> Thanks,
>
> Steve Ronderos