File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes EJB and other Java EE Technologies and the fly likes abstract dao factory Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "abstract dao factory" Watch "abstract dao factory" New topic
Author

abstract dao factory

Hanna Habashy
Ranch Hand

Joined: Aug 20, 2003
Posts: 532
hi all:
I have a question regarding using abstract dao factory design concept in j2ee application. If I am using abstract dao factory to return dao objects, is it appropriate to make the facotory return the sames objects over and over again, or to return a new object?
for example:
public DAOFatory
{
FirstDAO first = new FirstDAO();
//returning the same dao object
public FirstDAO getFirstDAO()
{return first;}
//returing a brand new dao
public FirstDAO getFirstDAO()
{return new FirstDAO();}
}
thanks


SCJD 1.4<br />SCJP 1.4<br />-----------------------------------<br />"With regard to excellence, it is not enough to know, but we must try to have and use it.<br />" Aristotle
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: abstract dao factory