8.6. Configuration
Configuration classes are in the com.samscdrental.configuration package:
Configuration.java DataAccessConfiguration.java ReportConfiguration.java
The Configuration class represents data for configuring other objects in the system. For example, DataAccessConfiguration contains information for the StoreDataAccess object. The StoreDataAccess object receives a filled-in DataAccessConfiguration object from the getDataAccessConfiguration( ) method in Configuration. The source of the information is transparent to StoreDataAccess. Configuration retrieves it from preset values, but it could read it from a configuration file or database. The central configuration file is a variation of the Service Locator pattern (see http://java.sun.com/blueprints/corej2eepatterns/Patterns/ServiceLocator.html for details).
Get Prefactoring now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.