jakarta-ee

Jakarta EE

Specific best practices and architectural patterns when working with Jakarta EE.

Details

Language / Topic
javaJava
Category
framework

Rules

balanced

Jakarta EE

- Use CDI (`@Inject`, `@ApplicationScoped`) for dependency injection. Use JAX-RS (`@Path`, `@GET`, `@POST`) for REST endpoints. Use JPA (`@Entity`, `EntityManager`) for persistence.

Jakarta EE

- Use CDI (`@Inject`, `@ApplicationScoped`) for dependency injection. Use JAX-RS (`@Path`, `@GET`, `@POST`) for REST endpoints. Use JPA (`@Entity`, `EntityManager`) for persistence.
- Use `@Transactional` for declarative transaction management. Implement `ExceptionMapper<T>` for consistent error responses. Use Bean Validation (`@NotNull`, `@Size`, `@Valid`) on DTOs. Use `@Produces`/`@Consumes` with `MediaType.APPLICATION_JSON`. Use `@Observes` for CDI event-driven communication between beans.