I am working on a web application. I am using
Struts for the presentation layer. Also I am using DAO
pattern for Database layer.
My doubt is about creating instance of DAO's. I am created a DAO Factory which can create instances of DAO's. Whether I can go for caching of DAO or Do I have to create a new DAO for everytime? Would caching done as shown in the code below create Concurrency issues? or please suggest the right way of going about it.
My Struts Action code is as follows:
UserDAO code is as follows:
And DAO Factory is as follows:
[ April 19, 2008: Message edited by: Palak Shah ]
[ April 19, 2008: Message edited by: Palak Shah ]