-
1. Re: getting the session from the cluster as7.1.1
vblagojevic Dec 6, 2012 4:43 PM (in response to crazycradd)So what you are trying to do is once you session fails over to another node you want to get a notification so that you can rehook your object to that session?
-
2. Re: getting the session from the cluster as7.1.1
crazycradd Dec 7, 2012 11:09 AM (in response to vblagojevic)Yes I need to do that and if Im an administrator I need to invalidate a users session that may be on another node
-
3. Re: getting the session from the cluster as7.1.1
pferraro Dec 7, 2012 1:03 PM (in response to crazycradd)I don't think this is going to work as you've implemented it. Even in the non-clustered case, what do you do if the session passivates? The reference to the session held by the object in the cache is no longer valid.
When web session clustering is enabled, we don't actually store the web session itself in a cache, but rather the information needed to recreate the session (i.e. session attributes and session meta-data). In fact, the contents of the web cache-container won't even be readable by your application, as they refer to classes not exposed to your application. To properly restore references to sessions, you'll need to register a HttpSessionActivationListener that reassociates the object with the session once the session is activated.
Does that answer your question?