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.
- Question 1Beginner
Configuration and Dependency Injection · Injection
A developer is injecting an optional configuration property named
app.welcome.messageinto 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
@ConfigPropertyannotation provides adefaultValueattribute. If the propertyapp.welcome.messageis missing from all sources, the container will inject the string "Hello World". UsingOptionalhandles missing values but requires extra code to retrieve the default at runtime. - 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
@Readinessannotation 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.@Livenessfailures trigger a restart. - 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
ReactiveHealthCheckinterface (from SmallRye Health) allows implementing health checks that return aUni. This is essential for non-blocking operations in a reactive stack, preventing the blocking of the event loop during health probes. - 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.
- 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
@CircuitBreakerannotation would open the circuit if 50% of the last 20 requests failed?Show answer & explanation
Correct answer: D
requestVolumeThresholdsets the size of the rolling window (20 requests), andfailureRatiosets the threshold (0.5 or 50%) of failures within that window required to open the circuit. - Question 6Advanced
Fault Tolerance · Bulkhead
You are applying the
@Bulkheadpattern to an asynchronous method returning aUni. 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=10allows 10 more to queue. Total capacity is 15. The 16th request exceeds the queue capacity and is immediately rejected with aBulkheadException.
Ready for the real thing?
The full EX378 simulator has every exam-style question, timed mode, and instant scoring.