Main class passes dbConn obj to all its services, I need to change the dbConn for one of its services. - suggestion for design pattern
- by tech_learner
There is this main class
and there are several services ( which uses db connection to retrieve data )
These services are initialized in the main class
db properties are obtained from the property file and then
dbconnection is opened by calling a method dbOpen() written in the main class
and the resultant connection object is set to the…