jQuery in Action, 3rd edition
The moose likes Glassfish and the fly likes Lost Sessions on Clustering Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Glassfish
Bookmark "Lost Sessions on Clustering" Watch "Lost Sessions on Clustering" New topic

Lost Sessions on Clustering

Jacob Jonson

Joined: Mar 19, 2013
Posts: 2
Hi all,

I tried to deploy a project on a Glassfish Cluster for several weeks now, but have some replication issues.

I have a Glassfish cluster of 2 nodes with 2 instances each.
Now I want to deploy an Application, but apparently the Session is not handled the right way. Using a simple JSP Page just showing session information for testing session replication everything seems fine.
Using our JSF 2.0 / Primefaces GUI the session sometimes replicates the right way, sometimes the server creates a new Session. This even happens staying on the same cluster-instance…

Unfortunately this is not replicable..

The server-logs do not really help a lot..

I brought the problem down to a simple application containing the informations from the simple JSP page to see if the session is newly created, but using JSF 2.0 now.
The problem is still the same, although it seems to be more replicable. Staying an the same instance is keeping the session. Changing the instance sill keeps the session but the first action on the new instance creates a new session. Reason seems to be "session expired" although session timeout is configured to 30 min.

Does anyone have an idea where to go on??

Here is the example code if it will help:

Michael Ernest
High Plains Drifter

Joined: Oct 25, 2000
Posts: 7292

This problem is almost certainly a deployment/configuration issue, not a code issue. Even if the log responses don't appear helpful, making them apparent is better than not.

Could you show us how your cluster is configured? The deployment descriptors, if any, would also help.

Make visible what, without you, might perhaps never have been seen.
- Robert Bresson
Jacob Jonson

Joined: Mar 19, 2013
Posts: 2
Thank you for response.
I am not sure if you mean the domain.xml or only the web.xml..

This is the web.xml:

I tried to put the domain.xml as attachment - but it does not seem to work - so here is the (long) code...

I agree. Here's the link: http://aspose.com/file-tools
subject: Lost Sessions on Clustering
jQuery in Action, 3rd edition