Skip to content

Legacy Architecture Overview

Maria Martinez edited this page Sep 21, 2026 · 2 revisions

Legacy Architecture Overview

The nr-forest-client-legacy module isolates legacy database operations, serving as the bridge between the modern Forest Client system and the ministry's historic Oracle Database.


Purpose and Scope

For decades, client records, tenure allocations, and forest health marks have been recorded in an enterprise Oracle database under the THE schema. The legacy service provides:

  1. Direct Oracle Data Access: High-performance JDBC queries mapped to modern Spring Boot endpoints.
  2. Backward Compatibility: Allows modern services to query existing client accounts, search by legacy client number, and retrieve historical relationship graphs.
  3. Transactional Persistence: Inserts new, approved client registrations, locations, and contacts into the Oracle THE schema with legacy primary keys and sequences.

Technical Stack

  • Framework: Spring Boot 4 WebFlux
  • Runtime: Java 21 LTS
  • Database Driver: Oracle R2DBC Driver 23.x (reactive non-blocking database access)
  • Mapping: MapStruct 1.6.x for high-efficiency, zero-reflection object mapping
  • Migrations: Flyway migration scripts in legacy/src/test/resources/db/migration for reproducible test/local schemas

Core Operations

1. Client Search & Lookup

  • Searches client records by client number, legal name, acronym, or doing-business-as (DBA) name.
  • Returns normalized client summary DTOs consumed by the main backend and processor.

2. Location & Contact Synchronization

  • Fetches all associated addresses, billing locations, and contacts recorded under a legacy client number.
  • Exposes endpoints to insert new location rows (CLIENT_LOCATION) and contact rows (CLIENT_CONTACT) when submissions are approved.

3. Duplicate Detection Queries

  • Provides fuzzy matching endpoints against THE.FOREST_CLIENT used by the background processor during automated validation checks.

Clone this wiki locally