Re: Storing interface instance in a user's session

2009-04-16 Thread Lukasz Lenart
2009/4/16 Security Management :
> I think I just was being dumb and did not make the IUser serializable, which
> should be all I need to do, yes?

Yes, you should get exception when session will be saved to disk.


Regards
-- 
Lukasz
http://www.lenart.org.pl/

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



RE: Storing interface instance in a user's session

2009-04-16 Thread Security Management
Thanks, I am doing that.

I think I just was being dumb and did not make the IUser serializable, which
should be all I need to do, yes?

-Original Message-
From: Jim Kiley [mailto:jhki...@summa-tech.com] 
Sent: Thursday, April 16, 2009 10:21 AM
To: Struts Users Mailing List
Subject: Re: Storing interface instance in a user's session

If you use SessionAware in your actions, you can receive a Map that
represents the session.  You could pass that Map into your user manager
class, and do the storage that way.

On Thu, Apr 16, 2009 at 10:18 AM, Security Management <
list-subscripti...@secmgmt.com> wrote:

> I want to store a list of interface instances (i.e. UserImpl which
> implements IUser), so I can have methods:
>
> public void setUser(List users)
> {
>This.getSession().put(SESSION_USER_LIST_KEY, users);
> }
>
> public List getUsers()
> {
>return (List) this.getSession().get(SESSION_USER_LIST_KEY);
> }
>
> I'm using Spring to manage struts objects.  Can someone help, I'm having
> trouble with finding out how in the documentation.  Maybe my google
> keywords
> are bad or something...
>
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>


-- 
Jim Kiley
Senior Technical Consultant | Summa
[p] 412.258.3346
http://www.summa-tech.com


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: Storing interface instance in a user's session

2009-04-16 Thread Jim Kiley
If you use SessionAware in your actions, you can receive a Map that
represents the session.  You could pass that Map into your user manager
class, and do the storage that way.

On Thu, Apr 16, 2009 at 10:18 AM, Security Management <
list-subscripti...@secmgmt.com> wrote:

> I want to store a list of interface instances (i.e. UserImpl which
> implements IUser), so I can have methods:
>
> public void setUser(List users)
> {
>This.getSession().put(SESSION_USER_LIST_KEY, users);
> }
>
> public List getUsers()
> {
>return (List) this.getSession().get(SESSION_USER_LIST_KEY);
> }
>
> I'm using Spring to manage struts objects.  Can someone help, I'm having
> trouble with finding out how in the documentation.  Maybe my google
> keywords
> are bad or something...
>
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>


-- 
Jim Kiley
Senior Technical Consultant | Summa
[p] 412.258.3346
http://www.summa-tech.com


Storing interface instance in a user's session

2009-04-16 Thread Security Management
I want to store a list of interface instances (i.e. UserImpl which
implements IUser), so I can have methods:

public void setUser(List users)
{
This.getSession().put(SESSION_USER_LIST_KEY, users);
}

public List getUsers()
{
return (List) this.getSession().get(SESSION_USER_LIST_KEY);
}

I'm using Spring to manage struts objects.  Can someone help, I'm having
trouble with finding out how in the documentation.  Maybe my google keywords
are bad or something...


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org