简体   繁体   中英

JSF ViewState with Conversations

We are using JSF with Primefaces on a IBM Websphere 8. My problem is, that if I have more Conversations in JSF, the ViewState expires. If a user works on two conversations and navigates to many pages, the buffer for viewstates (default 20 slots) is full and viewStates of the other conversation are deleted. So if I go back to the first conversation the viewState isn't there and I cannot work any more on this conversation.

Is there a posibility to save ViewStates in conversation or any other workaround? Setting javax.faces.STATE_SAVING_METHOD to client is not the best solution I think. Increasing org.apache.myfaces.NUMBER_OF_VIEWS_IN_SESSION dramatically is also not a really good solution, because of many sessions expected.

We solved it on our own. We take a PhaseListener and organize the views, so each conversation gets only one view-slot. Thats possible, because we disabled caching and so we do not need more than one view per conversation. Caching disabled is needed in our applications.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM