Skip to Main Content
Prefactoring
book

Prefactoring

by Ken Pugh
September 2005
Intermediate to advanced content levelIntermediate to advanced
240 pages
6h 28m
English
O'Reilly Media, Inc.
Content preview from Prefactoring

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).

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Understanding Unittest.Mock

Understanding Unittest.Mock

Mario Corchero
Java™ Performance

Java™ Performance

Charlie Hunt, Binu John

Publisher Resources

ISBN: 0596008740Supplemental ContentCatalog PageErrata