I have a web application that comprises the following:
How about defining a ConnectionFactory object, that takes an enum as a parameter and returns a fully-formed connection object?