Section 7: Review the Quarkus branch and deploy to OpenShift

Goal

Switch parasol-insurance-eap to the quarkus branch — the completed EAP → Quarkus migration — then:

  • Review the modernized code against what you fixed in earlier sections

  • Optionally run the app locally

  • Build and deploy it to OpenShift and verify the Parasol UI and APIs

In the previous sections you used MTA analysis and Developer Lightspeed to migrate pieces of the legacy application (MDB messaging, custom audit rules, Stateless EJB). The repository also carries a quarkus branch where that modernization is already applied end to end. This lab closes the loop: inspect the target architecture, then ship it to the cluster.

Exercise 1: Check out the quarkus branch

  1. In Dev Spaces, open a terminal so you can run the git commands. From the menu choose Terminal → New Terminal.

    Open a new terminal in Dev Spaces
    Figure 1. New Terminal
  2. Make sure you are in the parasol-insurance-eap project root.

  3. Fetch and check out the migrated branch. git reset --hard discards local changes to tracked files. git clean -df removes untracked files and directories left from earlier lab work (for example generated artifacts or files created by Developer Lightspeed) so they do not linger after the branch switch:

    git fetch origin
    git reset --hard
    git clean -df
    git checkout quarkus
    git pull origin quarkus
  4. Confirm you are on the right branch:

    git branch --show-current
    git log -2 --oneline

    You should see quarkus as the current branch.

If Dev Spaces prompts you to reload the window after the branch switch, accept the reload so the Java / Quarkus tooling picks up the new pom.xml. You may also see red error markers from MTA analysis reports left over from the previous branch — these will clear as the language server refreshes.

Exercise 2: Review the migrated code

Walk the same classes you touched earlier and compare them to the Quarkus implementations.

Packaging and dependencies

  1. Open pom.xml on the quarkus branch. Note the shift from an EAP / Java EE WAR toward Quarkus:

    • Packaging is jar (not war)

    • Dependencies come from the Quarkus BOM (quarkus-rest, quarkus-hibernate-orm, quarkus-messaging, quarkus-scheduler, JDBC drivers, and so on)

    • There is no jboss-eap-javaee8 BOM or javax.* EJB / JMS API stack

  2. Open src/main/resources/application.properties. Observe:

    • Dev profile uses in-memory H2

    • %prod profile uses PostgreSQL via POSTGRESQL_* environment variables (what OpenShift will inject)

Messaging: EmailIntakeMDB

  1. Open src/main/java/com/parasol/mdb/EmailIntakeMDB.java.

    Confirm the migration outcomes from Section 4:

    • @ApplicationScoped instead of @MessageDriven

    • @Inject instead of @EJB

    • @Incoming("email-intake") instead of JMS MessageListener / activation config

    • jakarta.* imports

Business services: ClaimService

  1. Open src/main/java/com/parasol/ejb/ClaimService.java.

    Confirm the migration outcomes from Section 6:

    • @ApplicationScoped + @Transactional instead of @Stateless

    • @Inject EntityManager instead of @PersistenceContext

    • No javax.ejb usage

Scheduling: EmailGeneratorBean

  1. Open src/main/java/com/parasol/ejb/EmailGeneratorBean.java.

    Note how the old EJB timer / JMS producer path became Quarkus-native:

    • @Scheduled(…​) instead of TimerService / @Timeout

    • @Channel("email-intake") Emitter<String> instead of JMS ConnectionFactory / Queue

    • Still @ApplicationScoped, feeding the same email-intake channel the MDB consumes

REST layer

  1. Open ClaimsResource and InboxResource. Confirm CDI @Inject of services (no @EJB) and jakarta.ws.rs APIs.

Concern Legacy (main) Quarkus branch

Packaging

WAR + EAP BOM

JAR + Quarkus BOM

APIs

javax.*

jakarta.*

Claims service

@Stateless EJB

@ApplicationScoped + @Transactional

Email intake

JMS @MessageDriven

@Incoming("email-intake")

Email generator

EJB timer + JMS

@Scheduled + @Channel Emitter

Datasource (prod)

java:jboss/datasources/…​

Quarkus JDBC + env vars

Exercise 3: Run Quarkus locally (optional smoke test)

Before deploying, you can smoke-test on the Dev Spaces / local JVM.

  1. From the project root:

    mvn quarkus:dev
  2. When Quarkus starts listening on port 8080, Dev Spaces shows a series of port-forward dialogs. Accept them in order so the app opens in your browser: yes (add a redirect) → Open In New Tab → Open.

    Dev Spaces port redirect dialogs for Quarkus on 8080
    Figure 2. Open forwarded port
    You may also see similar dialogs for port 5005 (the Quarkus remote-debug port). You can dismiss or ignore those for this exercise — we are only using the HTTP UI on 8080, not attaching a debugger.
  3. You should land on the Parasol Dashboard.

    Parasol Quarkus dashboard
  4. Open Claims and confirm seeded claims load from the API / UI.

    Parasol Quarkus claims list
  5. Open a claim detail (for example from the claims table) and confirm the page renders.

    Parasol Quarkus claim detail
  6. Open Inbox. The scheduled generator publishes sample emails onto the in-process email-intake channel. The first message can take a few minutes (scheduler delay), then new ones arrive about every 45 seconds. Until then the UI shows Waiting for emails…​.

    Parasol Quarkus inbox
  7. Stop the Dev mode process with Ctrl+C when finished.

Exercise 4: Deploy to OpenShift

Deploy from the quarkus branch using the manifests under openshift/ and a cluster-side binary Docker build. These steps assume oc is logged in and a {user}-ai-mta namespace is selected (oc project).

To start the deployment to OpenShift, let’s first change to our project namespace {user}-ai-mta.

oc project {user}-ai-mta

We also need a database backend for our modernized application. For this we use PostgreSQL.

Provision PostgreSQL

  1. Create an ephemeral PostgreSQL instance for the demo:

    oc new-app --template=postgresql-ephemeral \
      -p DATABASE_SERVICE_NAME=parasol-db \
      -p POSTGRESQL_USER=parasol \
      -p POSTGRESQL_PASSWORD=parasol \
      -p POSTGRESQL_DATABASE=parasol \
      -p POSTGRESQL_VERSION=12-el8
    You may see a warning about DeploymentConfig being deprecated. This is expected on OpenShift 5 and can be safely ignored — the PostgreSQL template still works correctly.
  2. Wait until the database is ready:

    oc rollout status deploymentconfig/parasol-db 2>/dev/null \
      || oc rollout status deployment/parasol-db
    oc get pods -l name=parasol-db

Build the Quarkus application

  1. Package the app locally (or in the Dev Spaces terminal):

    mvn clean package -DskipTests

    This produces target/quarkus-app/.

  2. Assemble a binary build context and start an OpenShift Docker build:

    rm -rf /tmp/parasol-build
    mkdir -p /tmp/parasol-build
    cp src/main/docker/Dockerfile.jvm /tmp/parasol-build/Dockerfile
    cp -R target/quarkus-app /tmp/parasol-build/
    
    oc new-build --name=parasol-insurance --binary --strategy=docker -l app=parasol-insurance
    oc start-build parasol-insurance --from-dir=/tmp/parasol-build --follow

Apply deployment manifests

  1. Deploy the application (image namespace is substituted from your current project). The Deployment maps Secret parasol-db into the POSTGRESQL_* variables expected by the %prod profile:

    sed "s|REPLACE_NAMESPACE|{user}-ai-mta|g" openshift/deployment.yaml | oc apply -f -
    oc apply -f openshift/service.yaml
    oc apply -f openshift/route.yaml
    oc rollout status deployment/parasol-insurance
  2. Get the Route URL and open it in the browser:

    ROUTE=$(oc get route parasol-insurance -o jsonpath='{.spec.host}')
    echo "https://${ROUTE}/"
  3. Verify the APIs from the terminal:

    curl -sk "https://${ROUTE}/api/claims" | jq .
    curl -sk "https://${ROUTE}/api/inbox" | jq .
  4. In the OpenShift console, open your project {user}-ai-mta Topology (or Workloads → Deployments) and confirm the application is running.

    OpenShift Topology showing parasol-insurance Quarkus deployment and Route
    Figure 3. OpenShift Topology

    You should see something similar to the topology above:

    • parasol-insurance — the Quarkus application (look for the Quarkus application badge). A blue ring around the node means the pod is healthy / running.

    • parasol-db — the PostgreSQL instance the %prod profile talks to. Topology may draw a connector from the app to the database.

    • Optionally you may still see a legacy parasol-insurance-eap workload in the same project from earlier demos; the one you just deployed is the Quarkus node.

      Select parasol-insurance, open the Resources side panel, and check:

    • Pods — at least one pod in Running state

    • Services — parasol-insurance

    • Routes — the public URL for the app (click it to open the Parasol UI in the browser, same as the oc get route host from the previous step)

      == Exercise 5: Review what changed in production config

  5. Re-open openshift/deployment.yaml and relate it to application.properties %prod settings:

    • POSTGRESQL_HOST=parasol-db

    • Credentials from Secret parasol-db

    • HTTP probes on /api/claims

  6. Contrast this with the legacy EAP approach (java:jboss/datasources/ParasolDS, jboss-all.xml JMS queue definitions). Quarkus moves runtime wiring into application config + Kubernetes env, which is easier to GitOps and promote across environments.

What we learned

  • The quarkus branch is the completed migration target for the patterns you practiced with MTA / DLS.

  • Messaging, CDI services, scheduling, and REST all use Quarkus / MicroProfile idioms (@Incoming, @Channel, @Scheduled, @ApplicationScoped).

  • Local quarkus:dev (H2) is ideal for quick UI verification; OpenShift uses PostgreSQL via the %prod profile.

  • Container deploy is a standard binary build + Deployment / Service / Route — no EAP-specific subsystem XML required.

Summary

Red Hat Developer Lightspeed for Migration Toolkit for Applications is an add-on to Red Hat Migration Toolkit for Applications that intelligently automates source code refactoring within your IDE. For workflow efficiency, you can see explanations and recommended code changes throughout the code refactoring process before applying fixes with the click of a button.

Unlike traditional coding assistants, Lightspeed for migration toolkit for applications is guided by MTA’s static code analysis and past migrations to suggest accurate code solutions from the start and also improve them over time. This helps developers refactor applications faster and predictably.

Optionally, you can also turn on “agent mode” to have built-in AI agents analyze your application to search and fix new issues that may arise after changing your code. This helps preserve functionality.

This add-on is included with a Red Hat Advanced Developer Suite subscription. For more information, visit Red Hat Advanced Developer Suite.