JSF cluster application

Asked

Viewed 281 times

1

What my application (JSF + Primefaces) needs to work with in a cluster?

I am doing a test in a cluster 3 Tomcat environment (with session replication) and my test application does not work.

At first I only included the tag <distributable/> in the web.xml.

The app is very simple, just one @ManagedBean @SessionScope and a xhtml with a button to increment a variable.

When the request jumps from one server to the other the session is lost.

Obs:

The environment seems to be set up right and working as there is a JSP page that works.

Source: Ramki Java Blog - Tomcat Clustering Series

1 answer

2

If you are using session Tomcat you should do something to share the session between Tomcat.

An approach is called Sticksession where you define only one machine for a particular client and direct all of its calls there. The problem with this approach is that if the machine goes down, the guy’s session is lost.

Another approach would be to save the bank session, so everything is persisted there and could be shared.

And another solution is this one from Omcat itself: http://tomcat.apache.org/tomcat-6.0-doc/cluster-howto.html

Browser other questions tagged

You are not signed in. Login or sign up in order to post.