This is a general question, not specific to my current application.
In a heavy Traffic MultiThreaded application, what is the approach to do following: assume that there is a DAO which contains a method updateData
to update some data inside of a database.
Questions:
- Is it a good approach to have a Singleton instance of that DAO class and access it's method
updateData
? - Or should I every time create a new object of that DAO and call the method
updateData
?