Jakarta EE Interview Questions – FAQ Part 1
- What makes Jakarta EE suitable for building distributed, multi-tiered applications?
Jakarta EE provides a standardized, component-based architecture for developing scalable enterprise applications.
The platform separates application logic into tiers, allowing flexibility in deployment:
- Client tier: Web browsers, mobile apps, or standalone clients.
- Web tier: Servlets, Jakarta Faces, or RESTful resources handling HTTP requests.
- Business tier: CDI beans or Jakarta Enterprise Beans (where still used) implementing business logic.
- Data tier: Persistence handled through Jakarta Persistence (JPA) connecting to relational or NoSQL databases.
This separation supports modularity, scalability, and easier maintenance.
- What is Jakarta EE?
Jakarta EE is the open-source successor to Java EE, governed by the Eclipse Foundation.
It defines a set of APIs, services, and specifications for building enterprise-grade, cloud-ready applications.
Jakarta EE 10 emphasizes cloud-native development, modern language features, and integration with microservices architectures.
- What are the main components of a Jakarta EE application?
A Jakarta EE component is a self-contained software unit assembled into an enterprise application.
The specification defines several types of components:
- Web components: Servlets, JSP (legacy), Jakarta Faces, and REST endpoints (JAX-RS).
- Business components: CDI beans or EJBs (in legacy systems).
- Persistence components: Entities managed by Jakarta Persistence (JPA).
- Messaging components: JMS message-driven beans for asynchronous communication.
- What do business components contain in Jakarta EE?
Business components (typically CDI beans or EJBs) implement core application logic, workflows, and rules.
They process requests from the web tier, interact with the persistence layer, and return results.
For example, in a retail system, a business component might handle inventory management, order processing, or payment workflows.
- Is a Jakarta EE application only web-based?
No. While Jakarta EE applications often expose web interfaces, they can also support:
- REST or SOAP APIs for service-to-service communication.
- Messaging systems through Jakarta Messaging for asynchronous tasks.
- Batch processing with Jakarta Batch for long-running jobs.
This makes Jakarta EE suitable for web apps, back-end services, and hybrid enterprise systems.
- Are JavaBeans considered Jakarta EE components?
No. The older JavaBeans model is not a Jakarta EE component type.
Instead, modern enterprise applications use CDI managed beans, which provide dependency injection, lifecycle management, and type-safe configuration, making them far more powerful than traditional JavaBeans.
- Is a static HTML page a Jakarta EE web component?
No. Static resources (HTML, CSS, JavaScript) are bundled with applications but are not themselves Jakarta EE components.
Web components are Servlets, JSPs, Faces pages, or REST endpoints.
- What can be considered a Jakarta EE web component?
Jakarta EE web components include:
- Servlets – Java classes handling HTTP requests and responses.
- Jakarta RESTful Web Services (JAX-RS) – classes exposing REST APIs.
- Jakarta Faces – component-based UI framework for server-side rendering.
These components define the interaction between users and the business logic.
- What is a container in Jakarta EE?
A container provides runtime services to components, such as lifecycle management, dependency injection, security, and resource management.
Examples include the web container (for servlets and REST resources) and the CDI/EJB container (for business components).
- What are container services?
Container services include:
- Lifecycle management – automatic creation and destruction of components.
- Dependency injection – wiring CDI beans and resources.
- Security – authentication, authorization, and role-based access control.
- Transaction management – declarative handling of distributed transactions.
- Concurrency and resource pooling – efficient thread and connection management.
These services allow developers to focus on business logic instead of low-level infrastructure code.
