IBM Certified Developer - Cloud Native Java with IBM Liberty Free Sample Questions

Create a free account to browse all 20 sample questions. The full practice test includes 199 questions. Use the simulator for timed and flashcard mode.

Try Simulator

C1000-155 Sample Questions

  1. Question 1

    Q1

    A financial services application running on Open Liberty needs to consume a RESTful API from a partner. This partner API is known for intermittent latency spikes. To prevent cascading failures, the development team wants to implement a resilience pattern that stops calling the service for a short period after a certain number of consecutive failures. Which MicroProfile Fault Tolerance annotation is the most appropriate for this specific requirement?

    Show answer & explanation

    Correct answer: C

    The @CircuitBreaker annotation is designed specifically for this use case. It follows the circuit breaker pattern, where after a configured number of consecutive failures (requestVolumeThreshold), the circuit 'opens' and subsequent calls fail immediately without attempting to contact the failing service. After a delay (delay), it enters a 'half-open' state to test if the service has recovered. @Retry would repeatedly call the failing service, potentially worsening the problem. @Timeout only limits the duration of a single call, it does not prevent future calls. @Fallback provides an alternative execution path on failure but does not stop calls to the original service.

  2. Question 2

    Q2

    A developer is configuring an Open Liberty server and needs to set a system property that must be available very early in the server startup process, even before the main server configuration (server.xml) is parsed. The property value is sensitive and should not be checked into source control. Which file is the standard and most appropriate location to define this property?

    Show answer & explanation

    Correct answer: B

    The bootstrap.properties file is specifically designed for setting properties that are needed before the main server.xml configuration is processed. It has a higher precedence for system properties than server.xml. This makes it ideal for setting early-stage configuration, such as properties that control the configuration parsing itself or sensitive values that should be externalized from the main configuration file.

  3. Question 3

    Q3

    A team is building a set of microservices on Open Liberty and wants to implement true-to-production integration tests. The inventory-service depends on a PostgreSQL database and a warehouse-service REST API. Which testing framework is specifically designed to manage the lifecycle of these dependencies in Docker containers during the test run, providing a production-like environment?

    Show answer & explanation

    Correct answer: D

    MicroShed Testing is a framework built on top of Testcontainers and JUnit 5, specifically for testing Jakarta EE and MicroProfile applications. It excels at starting the application in a Docker container alongside its dependencies (like databases or other services), creating a true-to-production test environment. Mockito is for mocking objects (unit tests), Pact is for contract testing, and JUnit 5 is a general testing framework that does not inherently manage containerized dependencies.

  4. Question 4

    Q4

    A cloud architect is designing a security model for internal microservices communication within a Kubernetes cluster. To achieve a zero-trust posture, the architect wants to ensure that when Service-A calls Service-B, both services cryptographically verify each other's identity before any data is exchanged. Which security mechanism should be configured in Open Liberty on both services to fulfill this requirement?

    Show answer & explanation

    Correct answer: C

    Mutual TLS (mTLS) is the correct mechanism for this scenario. In mTLS, not only does the client verify the server's certificate (standard one-way TLS), but the server also demands and verifies the client's certificate. This ensures both parties are who they claim to be, establishing a strong, mutually authenticated identity at the transport layer, which is a cornerstone of zero-trust network security. JWT is for application-level authentication/authorization, not transport-level identity verification. OpenID Connect is for user authentication.

  5. Question 5

    Q5Multiple answers

    A developer is creating a readiness health check for a microservice that depends on an external database. The goal is to prevent Kubernetes from routing traffic to the pod until the database connection is confirmed to be healthy. Which of the following code snippets correctly implements this @Readiness check using the MicroProfile Health API? (Select TWO)

    Show answer & explanation

    Correct answers: A, C

    This is a correct implementation. The class is annotated with @Readiness to mark it as a readiness probe, it implements the HealthCheck interface, and the call() method returns a HealthCheckResponse indicating the status.

    This is also a correct implementation. It uses the HealthCheckResponse builder pattern to construct the response, dynamically setting the status based on the result of the checkDatabase() method. The @Readiness annotation correctly designates it for readiness checks.

  6. Question 6

    Q6

    True or False: The 'zero migration' feature of WebSphere Liberty guarantees that an application developed for Liberty using Jakarta EE 8 APIs will run without any code or configuration changes on a newer Liberty version that supports Jakarta EE 10.

    Show answer & explanation

    Correct answer: B

    False. The 'zero migration' principle applies to the Liberty runtime itself, meaning you can update the runtime without changing your application or its configuration. However, it does not apply to major specification changes like the move from Jakarta EE 8 to Jakarta EE 10. This move involves a package name change from javax.* to jakarta.*, which requires significant code changes. The application would need to be recompiled against the new Jakarta EE 10 APIs.

  7. Question 7

    Q7Multiple answers

    A developer is using Liberty dev mode (mvn liberty:dev) for rapid application development. After making a code change in a JAX-RS resource class, they notice the change is not reflected when they test the endpoint. The console log shows no errors. What are the most likely causes for hot reload to fail in this scenario? (Select TWO)

    Show answer & explanation

    Correct answers: B, D

    Liberty dev mode relies on detecting changes to compiled .class files. If the Integrated Development Environment (IDE) is not automatically compiling the Java source files upon saving, dev mode will not detect any changes and will not trigger a hot reload.

    If the code change introduced a compilation error, the .class file will not be updated. Since dev mode monitors the compiled output directory, it will not see a new file and therefore will not reload the application. The developer would need to check their IDE's problem view or run a manual build to see the error.

  8. Question 8

    Q8

    A consultant is reviewing a microservice architecture and identifies that several services have hardcoded connection details for databases and external APIs within their server.xml files. This practice violates a key principle of the 12-Factor App methodology. Which factor is most directly violated by this approach?

    Show answer & explanation

    Correct answer: B

    Factor III, 'Config', states that configuration should be stored in the environment and strictly separated from the code. Hardcoding connection details in server.xml violates this principle because the configuration is bundled with the deployable artifact. The correct approach is to externalize this configuration using environment variables or a configuration service, which can then be injected into the application at runtime via MicroProfile Config.

  9. Question 9

    Q9

    A developer needs to implement a JAX-RS resource that accepts a user registration payload. The password field in the payload must be at least 12 characters long and contain at least one uppercase letter, one lowercase letter, one number, and one special character. Which Jakarta EE technology is the most appropriate and standard way to enforce these validation rules declaratively at the model level?

    Show answer & explanation

    Correct answer: C

    Jakarta Bean Validation is the standard specification for this purpose. By annotating the fields of the payload model class (POJO) with constraints like @Size(min=12) and @Pattern(regexp=...), the validation logic is kept declarative and separate from the business logic. When the JAX-RS method is annotated with @Valid, the Liberty runtime will automatically trigger the validation and return a 400 Bad Request if the constraints are violated.

  10. Question 10

    Q10

    An operations team is trying to integrate Open Liberty's logs with a centralized logging platform like Splunk or the ELK Stack. To make parsing efficient and reliable, they need the logs to be in a structured format. What is the simplest way to configure the Liberty server.xml to achieve this?

    Show answer & explanation

    Correct answer: D

    The correct and simplest method to enable structured JSON logging in Open Liberty is to add the attribute messageSource="json" to the element in server.xml. This instructs Liberty to write log records for messages.log and trace.log in JSON format, which includes fields like timestamp, log level, message, thread ID, and other context, making them easily parsable by log aggregation tools.

Register free to unlock 10 more sample questions

Create a free account to continue with the rest of the C1000-155 sample set.

Lifetime One

Own this practice test forever.

$79.99
$75.99
one-time
  • Full access to 199 questions
  • Study, Timed & Flashcard Modes
  • All past and future versions i
  • Detailed Explanations
  • Study Tracking & Past Attempts
  • Brainy AI Assistant
  • Lifetime updates

Two

Any 2 exams per month.

$20.00/exam
$39.99
/month
  • 2 active exam slots
  • Study, Timed & Flashcard Modes
  • All past and future versions i
  • Detailed Explanations
  • Study Tracking & Past Attempts
  • 1,000 Brainy AI Credits
  • Cancel anytime

Premium Twelve

Any 12 exams over 3 months.

$15.00/exam
$179.99
/3 months
  • 4 active exam slots
  • Study, Timed & Flashcard Modes
  • All past and future versions i
  • Detailed Explanations
  • Study Tracking & Past Attempts
  • 15,000 Brainy AI Credits
  • Dedicated support
  • Friend seat included — full access

Trusted by professionals at

NvidiaSupabaseGitHubOpenAITursoClerkClaude AIAmazon