users@glassfish.java.net

Re: GLASSFISH CLUSTER AND HTTPSESSIONLISTER

From: <Jan.Luehe_at_Sun.COM>
Date: Mon, 01 Oct 2007 16:03:26 -0700

glassfish_at_javadesktop.org wrote:

>>For example, what if someone wrote in an
>>implementation of HttpSessionListener that every time
>>a session was created, you were billed $1.00 for a
>>usage fee. In a one instance situation, you would be
>>correctly billed, i.e. $1.00 per session creation.
>>But on a 10 instance cluster, this behavior would
>> bill you $10.00 per session creation.
>>
>>
>>
>
>Larry:
>
>It's up to the listener to do what it wants to do. Just because
>it got a notification on session creation, doesn't mean it will
>update something, right?
>
>

The issue is that if your HttpSessionListener is supposed to
perform some non-idempotent action in response to a
session being created or invalidated, and your HttpSessionListener
may be invoked once for each instance in the cluster to which
your app has been deployed, it will be much harder for your
HttpSessionListener to consolidate its possbily multiple invocations.

But, as you and Larry mentioned, this is something the Servlet spec
needs to clarify.


Jan