This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I have written a spring web based application that has access to the database and I have the following class defined for accessing database.
I am using the following xml mapping for wiring the DAO class in my applicationContext.xml file
I have the following questions related to my MasterDao class.
1) Will two instances of MasterDao class be created? One for showAllProductsController and one for addToCartController ?
2) Shouldn't all the methods defined in MasterDao class be static so that nobody can new an instance and call these methods ?