-
1. Re: Conversations or No conversations ?
harpritt Apr 24, 2008 2:12 PM (in response to hasan_muhstaq)How long can you afford to leave a session open ?
how many users are there?
have you done any load test?could you break up the larger form pages in to smaller form pages that exend the session every time the user action touches the server.
-
2. Re: Conversations or No conversations ?
andygibson.contact.andygibson.net Apr 24, 2008 6:40 PM (in response to hasan_muhstaq)If this is a real concern and you are worried about leaving the conversation active, you have a few options.
One is to rely on the form to hold the state, so the form would be stateless, and the values are written back to the backing bean in a traditional JSF manner. Rather than bind to the entities, you bind to an event scoped backing bean which acts like a value object. Then you can push the value object into the entities once you save.
Another is to investigate the use of Page scope so the state is maintained automatically by Seam for that single form. I think with page scope, the state is held on the client side.
Or you can use a conversation with a long timeout for that particular conversation. Remember that different conversations can have different timeouts. However the timeout can only be as long as the users session is active for.
It really depends on how complex the form is, and as harpritt suggests, how many users you have, and the possible size of data in the conversation.
-
3. Re: Conversations or No conversations ?
hasan_muhstaq Apr 25, 2008 10:42 AM (in response to hasan_muhstaq)Thanks for ur replies
If this is a real concern and you are worried about leaving the conversation active, you have a few options.I am not worried about leaving the conversations active but curious to know what should be the best practice in this case. If I have correctly understood the concept of conversations then they are like mini-sessions, that is small sessions inside sessions that are are cleared once the conversation is ended or timed out.
So if I am having large long running conversations (in terms of timeout), conversation timeouts equal to that of session timeouts then its better not to implement long running conversations and leave everything in session?? Please correct if I am wrong.
It really depends on how complex the form is, and as harpritt suggests, how many users you have, and the possible size of data in the conversation.There are only 200 users and the form data contains 4 simple input text fields and only one large (@Lob) field that is the rich text.
-
4. Re: Conversations or No conversations ?
gromero Apr 25, 2008 6:26 PM (in response to hasan_muhstaq)long conversation have not implicance with the session duration. be careful, long conversation refers to mantain a long transaction between the client and the server, NO with de live of the session.
-
5. Re: Conversations or No conversations ?
andygibson.contact.andygibson.net Apr 25, 2008 8:37 PM (in response to hasan_muhstaq)Then I would go with the easier option of page or even event scope.
Your web page can hold the state for the form rather than using a conversation. This way the users can take as long as they want, submit the form and the form state will be pushed to the server from the client without any need to hold it on the server side.
Cheers,
Andy Gibson
-
6. Re: Conversations or No conversations ?
hasan_muhstaq Apr 28, 2008 10:31 AM (in response to hasan_muhstaq)
long conversation have not implicance with the session duration. be careful, long conversation refers to mantain a long transaction between the client and the server, NO with de live of the session.Thanks for the info Guillermo Romero.
If a long running conversation refers to a long transaction then what is the conversation context used for ?? that is if my SFSB is in Scope Conversation then what does it signify??
-
7. Re: Conversations or No conversations ?
hasan_muhstaq Apr 28, 2008 11:57 AM (in response to hasan_muhstaq)
Then I would go with the easier option of page or even event scope.
Your web page can hold the state for the form rather than using a conversation. This way the users can take as long as they want, submit the form and the form state will be pushed to the server from the client without any need to hold it on the server side.Thanks Andy Gibson.
i agree with u about the page scope but i was also looking at the code of this site and i added a new topic in the seam wiki forum. Just have a look at it if u have time. this is the link