Milan,

You could wrap an instance you create in a custom bean context and add 
it to and retrieve it from the session.

Something like the following except with your DAO instead of a user object:
http://stripesframework.org/display/stripes/State+Management

But I'm curious why doesn't a singleton DAO cut it?
Unless your retaining state in your DAO's... which is typically better 
done elsewhere.

--Nikolaos



Milan Halenar wrote:
> Hello, at the beggining let me briefly describe situation: 
>
> Im developing an web app in which i upload file, parse the file and store its 
> content in a simple DAO.
> Currently i implemented the DAO as singleton, so in my 
> ActionBean im doing this: 
>
> private FileParser fp = FileParser.getInstance();
>
> and every session(user) has the same instance of that dao.
> My aim is to have new instance of this class for every new session, i mean 
> not 
> having the FileParser implemented as a singleton.
> The problem is that i dont know how to get the specified instance of DAO with 
> users data in the ActionBean. Is there any suggested way to do this? Thanks
>
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Stripes-users mailing list
> Stripes-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/stripes-users
>
>   


------------------------------------------------------------------------------
_______________________________________________
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users

Reply via email to