-
1. Re: Conversation timeout in Seam3
lightguard Nov 24, 2011 3:33 PM (in response to lengelbrecht)
Louis Engelbrecht wrote on Nov 24, 2011 06:32:
Hi.
I have some questions regarding conversation timeouts in Seam3 and hope that someone can answer it,
1. Where can I see what the current default/global timeout is for conversation in the current Seam 3?I believe that's specified either in the CDI spec or in the CDI implementation.
2. Where and how can I set the default/global timeout?I don't recall, but you can manually change the timeout per conversation when you promote it to a long running conversation.
3. What is a good timeout for conversations? Should conversations have a shorter timeout than sessions and how much shorter?Yes, shorter than a session, it has to be shorter or the same as a session as conversations are sections of a session. How much shorter really depends on your application. There is no general rule.
-
2. Re: Conversation timeout in Seam3
lengelbrecht Nov 28, 2011 2:51 AM (in response to lengelbrecht)Does anyone know if the functionality mention in http://seamframework.org/Seam3/FacesModule to globally set the conversation timeout is implemented yet.
In http://seamframework.org/Seam3/FacesModule it states:
<beans xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:s="urn:java:seam:core" xsi:schemaLocation=" http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/beans_1_0.xsd"> <s:Conversation> <s:specializes/> <s:timeout>5000</s:timeout> </s:Conversation> </beans>
Is the timeout value in milliseconds?
Louis Engelbrecht
-
3. Re: Conversation timeout in Seam3
lightguard Nov 29, 2011 1:42 AM (in response to lengelbrecht)Yes, it's milliseconds.
-
4. Re: Conversation timeout in Seam3
aogier Mar 12, 2012 2:06 PM (in response to lightguard)But that doesn't work (java.lang.Exception: Could not resolve node Conversation in namespace urn:java:seam:core)
I've tried :
{code:xml}
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:s="urn:java:ee"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://jboss.org/schema/cdi/beans_1_0.xsd">
<s:Conversation>
<s:Specializes/>
<s:timeout>2000</s:timeout>
</s:Conversation>
</beans>
{code}
And there is seems there are no problem, but actually, my conversations still don't last 2 seconds, but much more. So it is not taken into account.
-
5. Re: Conversation timeout in Seam3
lightguard Mar 12, 2012 2:12 PM (in response to aogier)This is at a spec level (the conversation timeout). I suspect the best you'll be able to is manually set the conversation timeout when you begin, or as I said earlier, looking into how each implementation does it.