Changing the SessionAware interface would certainly break backward
compatibility, plus it would affect action testability.
If you don't like the downcast to SessionMap, I would rather consider
creating an additional interface, something like:
public interface SessionMapAware {
public void setSe
Wouldn't it be cleaner if
(1) the setSession(Map session) signature of SessionAware was changed to
setSession(SessionMap session) and
(2) the implementation of the invalidate method on internally took care of
dealing with already timed out sessions? (if one really wanted to know if
the session
Please go ahead.
> - Original Message -
> From: "Dave Newton" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List"
> Subject: Re: [S2] Session Invalidation through SessionAware interface
> Date: Sun, 1 Jul 2007 10:47:18 -0700 (PDT)
>
&
--- Ray Clough <[EMAIL PROTECTED]> wrote:
> Then to invalidate the Session, I do this [code]
Oh, I had no idea! If you have wiki karma maybe add a
FAQ entry, otherwise with your permission I'll do it.
d.
__
I use the "SessionAware" interface to retrieve a Map of the session. Then to
invalidate the Session, I do this:
if (session instanceof
org.apache.struts2.dispatcher.SessionMap) {
// it is possible that the session will have timed-out
between the
--- "Srinivas.N." <[EMAIL PROTECTED]> wrote:
> How do I invalidate the session?
You'd probably need to implement ServletRequestAware
[1] and get the session from the request.
and get the session from there.
You could use ServletActionContext [2] but that might
have a negative impact on testabili
6 matches
Mail list logo