EX378 Sample Questions

EX378 Sample Questions & Answers

Digs into building RESTful services with Jakarta REST, the single biggest weight, plus the type-safe REST client, Panache persistence, JWT-based security, Micrometer metrics, reactive messaging, distributed tracing, and externalized configuration.

Launch the full EX378 simulator →

Showing 6 of 12 free samples.

  1. Question 1Beginner

    Configuration and Dependency Injection · Injection

    A developer is injecting an optional configuration property named app.welcome.message into a CDI bean. If the property is not defined in any configuration source, the application should default to "Hello World". Which code snippet correctly achieves this?

    Show answer & explanation

    Correct answer: C

    The @ConfigProperty annotation provides a defaultValue attribute. If the property app.welcome.message is missing from all sources, the container will inject the string "Hello World". Using Optional handles missing values but requires extra code to retrieve the default at runtime.

  2. Question 2Beginner

    Health Checks · Readiness vs Liveness

    You are creating a custom health check to verify the connectivity of a critical downstream payment gateway. The check should only influence the orchestration platform's decision to route traffic to the pod, not whether to restart it. Which annotation should you use on your HealthCheck implementation?

    Show answer & explanation

    Correct answer: C

    The @Readiness annotation indicates that the application is ready to accept traffic. If a readiness check fails, the orchestration platform (like Kubernetes) stops sending traffic to the pod but does not restart it. @Liveness failures trigger a restart.

  3. Question 3Intermediate

    Health Checks · Reactive Health

    A developer needs to implement a non-blocking health check in a reactive Quarkus application. The check involves an asynchronous call to a remote service using a Mutiny Uni. Which interface should the bean implement to support this reactive pattern?

    Show answer & explanation

    Correct answer: B

    The ReactiveHealthCheck interface (from SmallRye Health) allows implementing health checks that return a Uni . This is essential for non-blocking operations in a reactive stack, preventing the blocking of the event loop during health probes.

  4. Question 4Intermediate

    Configuration and Dependency Injection · ConfigSource Ordering

    You have configured a custom ConfigSource in your Quarkus application to load properties from a centralized Vault service. However, you notice that these properties are being ignored when a system property with the same key exists. Why is this happening?

    Show answer & explanation

    Correct answer: C

    MicroProfile Config uses ordinals to determine priority. System properties typically have an ordinal of 400. If the custom ConfigSource has a lower ordinal (e.g., default 100), the system property will take precedence. To override system properties, the custom source must have a higher ordinal.

  5. Question 5Intermediate

    Fault Tolerance · Circuit Breaker

    Your microservice architecture includes a 'Catalog' service that depends on an external 'Inventory' service. You want to implement a circuit breaker to prevent cascading failures. Which combination of parameters in the @CircuitBreaker annotation would open the circuit if 50% of the last 20 requests failed?

    Show answer & explanation

    Correct answer: D

    requestVolumeThreshold sets the size of the rolling window (20 requests), and failureRatio sets the threshold (0.5 or 50%) of failures within that window required to open the circuit.

  6. Question 6Advanced

    Fault Tolerance · Bulkhead

    You are applying the @Bulkhead pattern to an asynchronous method returning a Uni . You configured @Bulkhead(value = 5, waitingTaskQueue = 10). What happens when the bulkhead receives the 16th concurrent request?

    Show answer & explanation

    Correct answer: D

    With value=5, 5 requests execute concurrently. waitingTaskQueue=10 allows 10 more to queue. Total capacity is 15. The 16th request exceeds the queue capacity and is immediately rejected with a BulkheadException.

Ready for the real thing?

The full EX378 simulator has every exam-style question, timed mode, and instant scoring.

Go to the EX378 simulator →