Skip to content

C1000-155 IBM Certified Developer - Cloud Native Java with IBM Liberty Practice Questions

Prepare for C1000-155 with more than an answer.

199 questions in the full set20 sample questionsUpdated Aug 20, 2026
Exam fee
$200 USD
Level
Developer
Valid for
3 years
Domains covered on the exam 10
  1. Liberty concepts8%
  2. Concepts of cloud-native Java and microservices7%
  3. Developer experience and tools8%
  4. Develop cloud-native Java microservices25%
  5. Data persistence and transactions6%
  6. Security11%
  7. Add telemetry/observability to microservices16%
  8. Test microservices6%
  9. Containerize and deploy5%
  10. Monitor and troubleshoot8%
  1. 1

    A team is managing a stateful application that stores user session data in memory. They need to deploy this application across multiple pods in Kubernetes for high availability. If a pod fails, users connected to it should be seamlessly failed over to another pod without losing their session. Which Liberty feature and configuration approach would solve this problem?

    Show answer details

    Correct answer: C

    The sessionCache-1.0 feature, which implements JCache (JSR 107), is the standard Liberty solution for distributed session management. By configuring it with a distributed in-memory data grid like Hazelcast or Infinispan, session data is replicated across the cluster. If one pod fails, another pod can retrieve the session data from the distributed cache, providing seamless failover. Session affinity does not provide failover, and database-backed sessions typically have higher latency.

  2. 2

    When comparing Open Liberty's container image options, a developer needs to choose a base image for a production microservice. The primary requirements are the smallest possible image size and the lowest potential attack surface. The service only uses MicroProfile APIs. Which official Open Liberty image tag would be the best choice?

    Show answer details

    Correct answer: C

    The kernel-slim image is the minimal base image for Open Liberty. It contains only the server kernel and does not pre-install any features. The developer would then use a multi-stage Docker build to add only the specific features their application requires (in this case, MicroProfile features). This results in the smallest possible final image with the minimum number of libraries, significantly reducing the attack surface, which is ideal for production deployments.

  3. 3

    True or False: Using the Open Liberty Operator to deploy an application to Kubernetes eliminates the need to create a Dockerfile for the application.

    Show answer details

    Correct answer: B

    False. The Open Liberty Operator manages the deployment and lifecycle of a Liberty application within Kubernetes. It automates tasks like creating Deployments, Services, and Routes based on a custom resource definition (OpenLibertyApplication). However, it still requires a pre-built container image to deploy. The developer is responsible for creating the Dockerfile, building the image containing the application, and pushing it to a container registry that the Kubernetes cluster can access.

  4. 4

    A developer is using the typesafe MicroProfile Rest Client to call a remote service. They need to dynamically add an Authorization header to every outgoing request without modifying the client interface. What is the standard MicroProfile approach to achieve this?

    Show answer details

    Correct answer: B

    The standard and most idiomatic MicroProfile approach is to implement the ClientHeadersFactory interface. This interface allows you to programmatically generate or modify headers for outgoing requests. The factory can then be associated with a REST client interface using the @RegisterClientHeaders annotation. This separates the concern of header manipulation from the client definition and business logic.

  5. 5

    An e-commerce platform's OrderService is experiencing intermittent OutOfMemoryError exceptions under heavy load. The service is running in a container with a 2GB memory limit. The operations team suspects a memory leak related to database connections. They have taken a thread dump and heap dump. What is the most effective next step to diagnose the root cause of the memory issue?

    Show answer details

    Correct answer: D

    For an OutOfMemoryError, a heap dump is the most critical artifact. Loading it into a tool like Eclipse MAT allows the team to analyze object retention, identify large object graphs, and run automated leak suspect reports. This will pinpoint which objects are consuming the most memory and what is preventing them from being garbage collected, directly leading to the root cause of the leak. While thread dumps are useful for hangs and deadlocks, they are less effective for memory leaks. Increasing memory only postpones the problem.

  6. 6

    A developer is using Jakarta Persistence (JPA) in a JAX-RS resource to fetch data. To prevent the 'N+1 select' problem when loading a Customer entity that has a collection of Order entities, what is the most efficient JPA fetching strategy to use?

    Show answer details

    Correct answer: C

    Using a JOIN FETCH in a JPQL query (e.g., SELECT c FROM Customer c JOIN FETCH c.orders WHERE c.id = :id) is the most effective way to solve the N+1 problem. It instructs the persistence provider to retrieve the associated collection (orders) in the same SQL query that retrieves the parent entity (Customer), thus avoiding the extra 'N' queries that would otherwise be executed when accessing the lazy-loaded collection.

  7. 7

    A developer needs to document a JAX-RS endpoint using MicroProfile OpenAPI. They want to provide a detailed example of the JSON response body. How can this be achieved using OpenAPI annotations?

    sequenceDiagram participant Client participant Liberty as Liberty (OpenAPI) participant Endpoint as JAX-RS Endpoint Client->>Liberty: GET /openapi Liberty-->>Client: OpenAPI document Note over Liberty,Endpoint: Annotations generate this doc Client->>Endpoint: GET /my-resource Endpoint-->>Client: JSON Response
    Show answer details

    Correct answer: B

    The correct and most structured way to provide a detailed example is to use the @APIResponse annotation on the method. Inside it, you define the media type using @Content, and within @Content, you provide one or more @ExampleObject annotations. The value attribute of @ExampleObject contains the string representation of the example JSON.

  8. 8

    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 details

    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.

  9. 9

    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 details

    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.

  10. 10

    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 details

    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.

Create an account to continue.