Hi Ranchers,
Am preparing for
SCEA and happened to see the following qn in one site,
You are creating a web application for an online product ordering system. You have decided to use connection pooling to reduce load on the databases. Since you have many databases, you want to create one pool instance of the ConnectionPool class for each database. Depending on what is requested, you may have to connect to a variable number of databases. What
pattern should you use?
a) Abstract factory b) Factory Method
c) Builder d) Prototype
e) Singleton
Where answer is given as E, and the reason given "The Singleton doesn't just create a single instance it can also be used to create a variable number of instances of a class. "
Am just wondering its given correctly or not? can someone please clarify?
Regards
Subash