users@glassfish.java.net

Re: "Persistence Type: replicated" working for anyone?

From: <glassfish_at_javadesktop.org>
Date: Fri, 05 Sep 2008 16:15:28 PDT

I'm glad you brought up the clusterjsp application. The sessions fail with it as well. Here is what I did get the session id to change with it.

1. I went the to the directory where the clusterjsp.ear file is located (/opt/SUNWappserver/samples/ee-samples/highavailability/apps/clusterjsp. I had the samples installed when I installed the app server.)
2. I created a directory called "changed" and copied the clusterjsp.ear file into it.
3. I unzipped clusterjsp.ear
4. I created a directory called "war" and moved the clusterjsp.war file into it.
5. I unzipped the war file.
6. I edited the WEB-INF/sun-web.xml file and change the line that says <session-manager persistence-type="ha"> to <session-manager persistence-type="replicated">
7. I reversed the unzipping with that file changed zipped up a new ear file.
8. I deployed the new ear file into a cluster with availability and load balancing enabled. The cluster is setup for load balancing (see below).
9. I pointed my browser to the web server that is doing the load balancing (http://websvr/clusterjsp). After the next couple of steps I also pointed my web browser to http://appsvr:<port>/clusterjsp and I had the same outcome.
10. I held down the f5 key and the ctrl-f5 key (I believe it happens either way.) After a few seconds the session id changes. In Firefox it changes after 1-5 seconds. It is more difficult to get it to do it in IE 6, but the session id does change.

Maybe I'm being unfair by holding down the refresh (f5) key. Tell me if I am but I don't think it is unfair as the timing of when the session id changes between Firefox and IE 6 is different. This might not be the same problem as when our custom app loses its session id ever few seconds to a minute in the application but it seems the same to me.

Here are some other details on how the cluster is setup.
Two instances in the cluster with "LB Enabled" set to true.
Http Load Balancers include the cluster in its targets.
Application load balancing enabled.
This might not matter since the sun-web.xml file contains this information but...
In the configuration for the cluster--
Availability service "Availability service" is enabled
Web Container Availability "Availability service" is enabled. Persistence Type is set to "replicated". Frequency is set to "web-method". Scope is set to "session".
EJB Container Availability "Availability service" is enabled. HA Persistence Type is set to "replicated"

Hopefully I gave you enough information. Can someone tell me if I did anything wrong. Can anyone get the same results as I did?

Thanks!
[Message sent by forum member 'jfaldmo' (jfaldmo)]

http://forums.java.net/jive/thread.jspa?messageID=297566