Example of Customizable Frameworks

The example resource adapter developed as part of this book uses a simple Log package that contains a log manager framework capable of creating instances of multiple types of log managers. Each log manager is capable of managing one or more individual logs.

By designing a simple interface to the log manager functions, it is possible to extend the features and support—not just simple ASCII files for logs, but also to interact with logs maintained by RDBMS or even remote RMI-capable logging mechanisms. The objective of the framework is simply to allow developers to add new features (log managers) without affecting existing features. The log manager package uses the well-known factory pattern to accept log manager ...

Get Java™ Connector Architecture: Building Custom Connectors and Adapters 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.