How to use JSF2.0 view scope in cluster environment?

admin

Administrator
Staff member
I want to use <strong>JSF2.0</strong> in cluster environment. I'm building a <strong>JPA2.0 + Spring 3.0 + JSF2.0</strong> stack. I know how to replicate session scoped beans. But how to replicate view scoped beans? I plugged view scope into <strong>Spring 3.0</strong> from here
<a href="http://cagataycivici.wordpress.com/2010/02/17/port-jsf-2-0s-viewscope-to-spring-3-0/" rel="nofollow">http://cagataycivici.wordpress.com/2010/02/17/port-jsf-2-0s-viewscope-to-spring-3-0/</a>

The idea is the same as in JS2.0 on JEE6 server - put a bean into the view map (
Code:
FacesContext.getCurrentInstance().getViewRoot().getViewMap()
)

The problem is :
I've opened
Code:
index.xhtml
on <strong>node 1</strong>.
Code:
View-scoped
bean was created. I clicked something and the
Code:
postback
request got onto <strong>node 2</strong> - where the view doesn't exist.

Is it possible to have this in cluster environment? Should I use only session and
Code:
request
scope?

On the other hand JSF view-state may not work properly in cluster environment. How to use JSF on cluster?