views:

378

answers:

1

I have two instances of Oracle Application Server (OAS) clustered together and replicating sessions. Whenever I terminate one of the instances by killing the process, the other instance picks up and contains the session. Everything works as expected. If I gracefully shutdown one instance (using opmn stopall) of OAS, HttpSessionDestroyedEvent events are fired off and information is getting deleted, thus causing the application to not fail over gracefully. This is my first experience with a clustered environment and I am curious if this is common. I know and expect that the HttpSessionDestroyedEvent events are fired off in a non clustered environment when the server instance is stopped, but it just doesn't seem correct here. How would one perform any kind of maintenance on one server? I am using the Spring Framework which is where the HttpSessionDestroyedEvent event comes from.

A: 

It seems that this is a common problem with clustering and web servers. Basically when a single node belonging to a cluster is gracefully shutdown, that node will fire off session destroyed events for all of the sessions that belong to that node, even if more nodes are up and running in the cluster. Here are a few more links that describe the same problem I am having.

Tomcat Issues

JBoss Issues

A workaround is to load a properties file (see JBoss link) that contains a shutdown flag anywhere that you listen for a session destroyed event. One drawback to this is that the system admin has to remember to update the properties file before and after restart.

hoffmandirt