Applied AI-Accelerated Government Development

Legacy Field Guide: Java EE, .NET Framework and Access

Updated

Intermediate

What you'll learn

~55 min
  • List where the logic hides in a Java EE deployment (session beans, JPA named queries, XML descriptors, message queues, timers), a .NET Framework app (code-behind, web.config, WCF contracts) and an Access database (saved queries, VBA, macros, linked tables), as a place to look rather than a guarantee
  • Run a static extractor over committed files that produces rows for lesson 24's dependents table, each with a file and line, and answer lesson 24's open question about the supervisor's Access database: which dbo.Intake columns it reads
  • Send everything the extractor cannot read, such as queries built at run time, unseen queries and macros, to a numbered unknowns list instead of guessing
  • Record what each old application does with the capture that fits its stack: HTTP at the web server's edge, a browser for pages that carry their state in the page, a queue copy for messages, and exported query results for fixed parameters

Lesson 24 left one row of its dependents table unresolved: MSACCESS from SUP-WS-014, linked tables in a supervisor’s Access database, marked “unknown column use” and U-09 because nobody had seen its queries. This lesson sees them. It also covers the two kinds of application you will meet next to a database like that one: a Java server application and a .NET Framework web application. The method is the one from lessons 22 to 25, read and record, then prove side by side, then keep the database as the landing place. What changes is where the logic is hiding.

Before the detail — Artifact: rows for db-dependents.md produced by an extractor over committed files, one per dependent, each with a file and line, plus a numbered unknowns list (U-40 and up). Acceptance test: the extractor names the dbo.Intake columns the supervisor’s database reads; a saved query that reads another saved query inherits that query’s columns, and deleting that one line of the extractor turns a test red by name. Status: reusable guidance for the reading step. The places to look are standard architecture and are not sourced claims; the extractor, the fixtures and rules R-40 and R-41 are this module’s.

⚠Exports and descriptors can carry secrets

A web.config, a data source definition or an Access link can hold a database password in plain text. The extractor in this lesson records that a password is present and never copies its value, and the fixtures use an invented one. Treat a real export the same way: scan it for secrets before it goes into a prompt, and give the agent the export, not the live file server. Query text can also carry literal case values; replace literals before sharing, as in lesson 24.

Where to look

Static reading finds what files declare. These are the places the logic tends to hide, stack by stack. The lists come from how these platforms are built and are not claims from a vendor page, so use them as a checklist of where to look, not as proof that nothing else exists.

StackWhere the logic hidesWhat reading it gives youWhat it cannot give you
Java EEsession beans (EJB, server-side components the application server runs), message-driven beans, JPA entities and named queries (JPA maps Java classes to tables), ejb-jar.xml and persistence.xml, vendor descriptors, JNDI data source names (a lookup name the server resolves), JMS queues (the message broker), timersbeans, schedules, queue names, the columns a named query readsthe database a JNDI name points at, who sends a message, any query built at run time
.NET FrameworkWeb Forms code-behind (the C# file behind each page), web.config, WCF contracts and bindings (WCF is .NET’s way to publish and call service endpoints), ADO.NET callsconnection strings, endpoints and their security mode, the queries written as literalsqueries assembled at run time, state carried in the page itself, the remote end of a call
Accesssaved queries (select, action and pass-through), VBA modules, macros, forms and reports with event code, linked-table definitions, startup options such as an AutoExec macrowhich linked tables each query reads, which VBA writes through the linkforms and macros not in the export, VBA that builds SQL, procedures called on the server

Two lessons carry over unchanged. The side effects are rules too: a timer that runs at 02:30 and a VBA procedure that closes old cases both change rows with nobody present. And a place you cannot read goes to unknowns.md, not into rules.md (lesson 22).

ProblemThe patternWhere your platform lesson lands itYou decide
nobody knows what the old app depends onextract declared dependents statically, cite file and line34: assessment tools in the status box · 35 and 36: same reading, different targetwhether an assessment tool’s report replaces the extractor or sits beside it
queries built at run timename them as unknowns, settle them with a query record34: query record on the managed database · 35 and 36: the engine’s own loggingwho may turn logging on in the old system, and for how long
a supervisor’s Access file is a hidden writerexport its objects, read the links and the VBA34 to 36: the database stays; the link target moveswhether the file is retired, linked to the new database, or rebuilt
state or messages live outside the databasecapture where the traffic passes: web edge, browser, queue37: where the pipeline stores captureswho may capture production traffic

Why static, and what it covers

Every command below runs against files committed in the reference, on any operating system, with no application server, no IIS and no Office installed. That is deliberate: the reading step should not wait for a Windows machine.

It is also a bounded claim. The extractor reports the columns a statement it could read names. It does not report the application’s complete dependencies. Four gaps are named every time: queries built at run time, external schedulers, objects not in the export, and anything behind a name the extractor cannot resolve. Each becomes a numbered unknown with a citation and who could settle it. The rule is R-40: every dependent and every unknown carries a path:line.

Plan the change with your agent

Open your agent in the project root and switch to Plan mode (Shift+Tab, /plan, or the mode picker). A Java deployment, a .NET app, and an Access database share no code, so one agent reading all three in a single pass would mix their citations. Module 19 lesson 5 teaches the orchestration; here, ask your agent to plan one subagent per application under fixtures/field-guide/app-tier/:

Plan how to extract the database dependents and unknowns for the java, dotnet, and access fixtures under fixtures/field-guide/app-tier/ using one subagent per application. Ask me anything unclear before running the extractor.

What to check in the plan before you approve

  • Each subagent runs the static extractor on its own stack (java, dotnet, access) and returns rows for modernization/db-dependents.md plus unknowns numbered from U-40, with every dependent and unknown carrying an exact path:line citation.
  • The merge pass copies cited rows only and never invents a row the extractor did not produce.
  • For the Access export (U-09), the plan checks both which dbo.Intake columns the saved queries read (including queries that select from other saved queries) and whether any VBA module writes through the linked table.
  • Any statement the static reader cannot parse (runtime-concatenated SQL, crosstabs, subqueries, EXEC pass-throughs, or unexported macros) stays in the unknowns list rather than being guessed.

If the first plan reads all three application directories in one context or guesses the columns behind a runtime-assembled query, steer it before approving:

Use one subagent per application folder, keep runtime-assembled queries in unknowns from U-40, and do not add rows the extractor did not cite.

Watch it work

SESSION Three applications, three subagents, one unknowns list
  1. Typed in the terminal: claude
  2. Mode:Plan mode (Shift+Tab)
  3. You type in the session: Plan how to extract the database dependents and unknowns for the java, dotnet, and access fixtures under fixtures/field-guide/app-tier/ using one subagent per application.
  4. The tool replies: Plan: 1. java subagent: node --experimental-strip-types src/modernization/field-guide/app-tier/extract.ts fixtures/field-guide/app-tier java 2. dotnet subagent: same, dotnet 3. access subagent: same, access; report the dbo.Intake columns it reads and any write 4. merge pass: copy cited rows only, renumber unknowns from U-40, add nothing 5. npx vitest run tests/unit/field-guide-app-tier.test.ts Approve?
  5. You type in the session: Approved. Run it and tell me what the supervisor's Access database does to dbo.Intake.
  6. The tool replies: access: 12 dependents, 7 unknowns MSACCESS from SUP-WS-014 (SupervisorTracking.accdb) | Intake.CaseId, CaseType, Status, SubmittedAt, HouseholdSize, DaysWaiting | R/W | a saved query selects * Two findings change lesson 24's row: - It writes. VBA modSupervisor.CloseStale runs UPDATE dbo_Intake SET Status = 'CLOSED' (access/vba/modSupervisor.bas:9), through the link, not through usp_SubmitIntake. Lesson 24 had it as read-only. - HouseholdSize is read by exactly one saved query, qryEverything, and only through SELECT * (queries.txt:12). No query names it. Still unknown: qryHouseholdSplit (crosstab), qryAboveAverage (subquery), qryServerSummary (EXEC), the AutoExec macro, and ExportFor, which builds its SQL at run time.
  7. Typed in the terminal: npx vitest run tests/unit/field-guide-app-tier.test.ts
  8. The tool replies: Test Files 1 passed (1) Tests 18 passed (18)

Illustrative session; exact output varies by tool and agency configuration.

The extractor output and the test results in this lesson come from running this code. The Java, .NET and Access fixtures are small files written for this lesson, so the counts describe them, not your estate.

Java EE: descriptors, entities and queries

The descriptors name the beans, the timers and the queue. In the sample legacy fixtures, ejb-jar.xml declares a session bean with a schedule (reference excerpt that your agent reads; you do not type it by hand):

// fixtures/field-guide/app-tier/java/META-INF/ejb-jar.xml (excerpt)
<session-type>Singleton</session-type>
<timer>
<schedule><hour>2</hour><minute>30</minute></schedule>
<timeout-method><method-name>buildDigest</method-name></timeout-method>
</timer>

The extractor reads XML with a few regular expressions rather than a parser. That is fine for descriptors like these and is a stated limit: no namespaces, no CDATA, and an element nested inside another element of the same name is not supported. If your descriptors do any of that, use a real XML parser and keep the rest.

JPA is where the columns are. An entity maps a class to a table, and a named query is JPQL (JPA’s query language) written against the class’s fields, not the table’s columns. The extractor maps fields back to columns through the @Column annotations on the reference legacy entity in fixtures/field-guide/app-tier/java/src/IntakeEntity.java:

// fixtures/field-guide/app-tier/java/src/IntakeEntity.java (excerpt)
@NamedQuery(name = "Intake.openByType",
query = "SELECT i.caseId, i.status FROM IntakeEntity i "
+ "WHERE i.caseType = :type AND i.status <> 'CLOSED'"),
@NamedQuery(name = "Intake.waitingLong",
query = "SELECT i FROM IntakeEntity i WHERE i.daysWaiting > :days ORDER BY i.submittedAt")

The first reads CaseId, Status and CaseType. The second selects the entity itself, which reads every mapped column, so it is the same kind of risk as lesson 24’s SELECT * view. A query assembled with + orderBy is different: nothing static can say what it reads, so the reference extractor in gov-dev-reference-app records it as an unknown with its line:

// src/modernization/field-guide/app-tier/java-ee.ts (excerpt)
if (lit.dynamic) { unknowns.push({ what: `${name}: ${m[1]} builds its text at run time (${expr.replace(/\s+/g, ' ').trim().slice(0, 100)}); columns not read`, evidence: ev, settledBy: 'run the code path with query logging on, or ask the owner' }); continue; }

Two more unknowns are structural. The data source is a JNDI name, java:/jdbc/IntakeDS, and the server’s own configuration says which database that is; the deployment files do not. And the message-driven bean listens on jms/IntakeEvents, but who puts messages there is a fact about the broker. Both are reported, with the file and line, and neither is guessed.

.NET Framework: web.config, WCF and code-behind

web.config holds the connection strings and the WCF endpoints. The reference extractor in gov-dev-reference-app records server, database and login type, and notes a stored password without copying it:

// src/modernization/field-guide/app-tier/dotnet.ts (excerpt)
const p = parts(c.attrs.connectionString ?? '');
const login = 'integrated security' in p || 'trusted_connection' in p ? 'Windows login' : `SQL login ${p['user id'] ?? p.uid ?? '?'}`;
const plain = 'password' in p || 'pwd' in p;

For each WCF endpoint it resolves the binding configuration to its security mode, so the row reads contract Agency.Intake.IIntakeStatus; wsHttpBinding; security Transport. The contract interface gives the operations callers are generated from. An outbound client endpoint is a dependency in the other direction, and the service behind it is an unknown.

The code-behind is where the SQL is. The extractor finds each new SqlCommand(...), follows a variable to its last assignment, joins adjacent string literals, and reads the result like any other statement. Page_Load reads CaseId, CaseType, Status, SubmittedAt and DaysWaiting; Approve_Click reads CaseId and writes Status. A query that appends ClauseFor(...) is a run-time unknown. Two shape risks are flagged because they match lesson 24’s: results read by position (GetInt32(0)), where reordering a select list breaks the page, and ViewState keys, state that travels inside the page between requests.

Whether Web Forms pages and WCF services have a home in current .NET is a question for Microsoft’s migration pages. This lesson did not confirm either claim, so check before you plan a port.

Access: the supervisor’s database

The export format is this lesson’s own: one header line per object, then its text. How you produce an export (a loop over the saved queries, a scripted read of the database’s system tables) is not sourced here and is for you to check on your Access version. The linked-table file in the reference legacy fixtures maps each Access name to its real table, so dbo_Intake resolves to dbo.Intake (reference excerpt that your agent reads):

// fixtures/field-guide/app-tier/access/SupervisorTracking.queries.txt (excerpt)
-- query: qryEverything | type=select
SELECT * FROM dbo_Intake;
-- query: qryBands | type=select
SELECT CaseId, fnPriorityBand(DaysWaiting) AS Band FROM dbo_Intake;

qryBands reads two columns and calls fnPriorityBand, a VBA function the export does not include, so the columns are reported and the function is an unknown. The reference SQL column reader in gov-dev-reference-app declines what it cannot read whole and says why:

// src/modernization/field-guide/app-tier/sqlcols.ts (excerpt)
const reject = /\(\s*select\b/i.test(s) ? 'a subquery' : /\bunion\b/i.test(s) ? 'UNION' : /\bpivot\b/i.test(s) ? 'a crosstab (TRANSFORM ... PIVOT)'
: /^(exec|execute)\b/.test(use.verb) ? 'EXEC: it runs a procedure whose body is not in this input'
: !['select', 'update', 'insert', 'delete'].includes(use.verb) ? `a ${use.verb.toUpperCase() || 'blank'} statement` : '';
if (reject) { use.unparsed = reject; return use; }

A saved query can read another saved query, as qryOverThirty reads qryOpenCases. The inner query’s columns are not visible in the outer text, so the reference extractor in gov-dev-reference-app inherits them, which over-states what the outer one needs and is labeled that way:

// src/modernization/field-guide/app-tier/access.ts (excerpt)
// A query that reads another saved query inherits what that one reads (an over-approximation: all of it).
const effective = (name: string, seen: string[] = []): SqlUse['tables'] => {
const e = uses.get(name.toLowerCase());
if (!e || seen.includes(name.toLowerCase())) return {};
const out: SqlUse['tables'] = {};
for (const [t, u] of Object.entries(e.use.tables)) out[t] = { ...u, read: new Set(u.read), write: new Set(u.write) };
for (const o of e.use.others) for (const [t, u] of Object.entries(effective(o, [...seen, name.toLowerCase()]))) {
const x = (out[t] ??= { read: new Set(), write: new Set(), star: false, positionalInsert: false });
u.read.forEach((c) => x.read.add(c)); u.write.forEach((c) => x.write.add(c)); x.star ||= u.star;
}
return out;
};

VBA gets the same treatment in the reference legacy module fixture: CloseStale is a literal UPDATE, so it is read; ExportFor concatenates a variable, so it is an unknown:

// fixtures/field-guide/app-tier/access/vba/modSupervisor.bas (excerpt)
Public Sub CloseStale()
CurrentDb.Execute "UPDATE dbo_Intake SET Status = 'CLOSED' " & _
"WHERE DaysWaiting > 180", dbFailOnError
End Sub

That procedure answers U-09 and corrects lesson 24. The supervisor’s file is not only a reader: it can set Status to CLOSED on any case older than 180 days, bypassing usp_SubmitIntake and its audit row, with the trigger from lesson 24 still firing. The new writer from lesson 24 now has one more writer to coexist with, and a decision that belongs to the business owner (retire the VBA, keep it, or move the rule). It is a new fact, not a defect ruling.

Record what each old app does

Reading says what the code declares; parity needs what it does. The capture depends on where the traffic passes.

StackCaptureWatch for
.NET Framework webHTTP capture at the web server’s edgeViewState-heavy pages: the page returns a state field the next request must echo, so replay from a script fails. Capture them in a browser
Java EEHTTP capture at the edge; a copy of the messages on the queue; the persistence layer’s query logthe message shape is set by the producer, so capture real messages and do not invent them
Accessexport each query’s result for fixed parameter values, such as [Start date] set to one agreed datequeries with unknown parameters, VBA that runs on form events

The referee rule from lesson 25 holds in all three: the agent proposes the inputs, and the legacy system supplies the answers. Recorded outputs may carry case data, so they follow the same handling rules as the restore in lesson 24.

Prove it

Run npx vitest run tests/unit/field-guide-app-tier.test.ts from gov-dev-reference-app. All 17 tests pass.

1. The rule of record, R-40. The test “holds for all three applications” checks that every dependent’s evidence and every unknown’s evidence is a path:line. Rules to add to rules.md:

IDRuleCitationSide effects
R-40every extracted dependent and every unknown carries a file and linetests/unit/field-guide-app-tier.test.tsnone
R-41a column the extractor cannot find in the schema snapshot is reported as unknown, never droppedtests/unit/field-guide-app-tier.test.tsnone

Here is the reference test excerpt in tests/unit/field-guide-app-tier.test.ts from gov-dev-reference-app verifying saved-query column inheritance:

// tests/unit/field-guide-app-tier.test.ts (excerpt)
it('a query that reads another saved query inherits the columns that query reads', () => {
expect(row(access, 'qryOverThirty', 'dbo.Intake').columns).toEqual(['CaseId', 'CaseType', 'Status', 'DaysWaiting']);
expect(row(access, 'qryOverThirty').shapeRisk).toContain('reads through qryOpenCases');
});

Their tests of record are “holds for all three applications” (R-40) and “is reported, not dropped” (R-41). A linked table whose target is missing from the snapshot (a link to dbo.Unseen) is the same rule: the statement comes back unparsed and joins the unknowns instead of stopping discovery.

2. The planted fault. In access.ts, delete u.read.forEach((c) => x.read.add(c)); from the inheritance loop. The code still compiles and the extractor still runs, but a query on a query now fails with this test output:

FAIL tests/unit/field-guide-app-tier.test.ts > Access export (U-09) > a query that reads another saved query inherits the columns that query reads
AssertionError: expected [] to deeply equal [ Array(4) ]
Test Files 1 failed (1)
Tests 1 failed | 17 passed (18)

Restore the line and all 17 pass again. The failure is exactly the quiet kind that matters: without the test, the supervisor’s rollup would still look plausible while missing the columns read through other queries.

3. A password never reaches output. The test “never copies a connection-string password into any output” serializes everything the .NET and Access extractions produce and fails if the fixture’s invented password appears.

KNOWLEDGE CHECK

The extractor reports that the supervisor's Access database reads CaseId, CaseType, Status, SubmittedAt, HouseholdSize and DaysWaiting from dbo.Intake. A teammate says this is the complete list of what the database touches. What is the correct reply?

KNOWLEDGE CHECK

A Web Forms page's recorded replay fails every time, though the same page works in a browser. The page carries its state in a hidden form field. What is the right capture?

ℹStatus checked 2026-11-05

Availability, authorization, agency approval, region support, and price are five separate facts; recheck each source and your agency’s authorization boundary before you rely on any of this. Assessment tools: Konveyor describes itself as “an open-source project that gives developers and platform teams visibility, analysis, and transformation tools”, with a command line called Kantra for static analysis (Konveyor). Azure Migrate’s application and code assessment for Java and .NET needs source code; plain Azure Migrate discovers configuration only (overview, updated 2026-04-13). Azure Migrate is listed in the Azure Government audit scope; the assessment tools are not separately listed. GitHub Copilot modernization migrates .NET applications and replaces the .NET Upgrade Assistant, which Microsoft calls “officially deprecated” (Upgrade Assistant, 2026-03-19); whether it runs inside Azure Government subscriptions was not confirmed. A Java edition was not found, and AWS Transform’s Java coverage was not confirmed. For Access, SQL Server Migration Assistant for Access moves a database to SQL Server and Azure SQL and documents the linked-table pattern, where tables move and the Access front end stays (SSMA for Access, 2026-04-20). Lifecycles: Access LTSC 2021 mainstream support ended 2026-10-14 and Access LTSC 2024 runs to 2029-10-10. .NET Framework 4.8 and 4.8.1 end with the Windows version under them, and 4.6.2 ends 2027-01-13. WebSphere traditional 9.0.x has no announced end-of-support date on IBM’s lifecycle page, so do not plan around one. Oracle’s Java 8 dates, WebLogic and JBoss lifecycles, the Jakarta namespace change, and whether Web Forms and WCF server run on current .NET were not confirmed: look up the vendor page for your exact version.

Practice status — reading three legacy application stacks before rebuilding them

PracticeStatusAlso called
static dependency extraction with file and line for every rowcommon baselinecode scanning; application inventory
assessment tool run over source (Kantra, Azure Migrate application assessment)strong optionalmigration readiness assessment
unreadable statements listed as named unknowns, with the gaps statedemergingdiscovery gaps; coverage statement
inventory of an Access file from an object export, including links and VBAemergingend-user computing inventory
capture at the web edge, in a browser, on the queue, or by exported query resultscommon baselinecharacterization capture; golden master
recorded outputs replayed against the new code with the legacy system as the oraclecommon baselinedifferential testing

Scale: required | common baseline | strong optional | reference-shop (seen only at organizations that publish their own practice) | emerging

Key takeaway

Logic hides in different places in each stack: descriptors and named queries in Java, code-behind and web.config in .NET Framework, saved queries and VBA in Access. A static extractor reads what those files declare, cites the file and line for every row, and turns what it cannot read into numbered unknowns. Run on the supervisor’s Access export, it shows the file reads all six dbo.Intake columns, one of them only through SELECT *, and writes Status through a VBA procedure that lesson 24 had not seen. Lesson 30 takes the next dependent from that table, Intake_Nightly_Export, and proves a batch job’s output the same way.

LEADERSHIP DECISION
a legacy application is not scheduled for replacement until its dependents table is cited and every unknown has an owner; the supervisor's VBA write is ruled on by the business owner
PRACTITIONER ACTION
export each application's objects, run the extractor, put the rows into db-dependents.md, and open an unknown for everything it could not read
SUCCESS MEASURE
audit finding avoided: no writer to the case table that the cutover plan has not seen

Legend: LEADERSHIP DECISION = what a leader decides · PRACTITIONER ACTION = what the engineer does next · SUCCESS MEASURE = how you know, in calendar time, assessor-hours or cost, contract or revenue risk, or audit finding avoided

Search lessons