Here is the qucstion confusing me:
You are creating a web application for an online product ordering system. You will be using data from several different databases and to reduce the load on the databases you have decided to use connection pooling. You have a ConnectionPool class and you want one pool for each database. However, you will have to connect to a variable number of databases. What
pattern should you use?(Select 1 correct choice)
a) Abstract factory
b) Factory Method
c) Builder
d) Prototype
e) Singleton
the choice e) is correct, and the explanation is "The Singleton does not just create a single instance it can also be used to create a variable number of instances of a class."
If so, what structure is the ConnectionPool class? when do it create a instance linked to a database and when create another one linked to another database?
[ March 15, 2005: Message edited by: Along huang ]