Louis Engelbrecht wrote on Nov 24, 2011 06:32:
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.
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?
Yes, it's milliseconds.
But that doesn't work (java.lang.Exception: Could not resolve node Conversation in namespace urn:java:seam:core)
I've tried :
<?xml version="1.0" encoding="UTF-8"?>
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.
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.