Hibernate / EclipseLink Interview questions
What is the relationship between EclipseLink and Jakarta Persistence?
Jakarta Persistence is the specification: a set of interfaces, annotations, and behavioral rules that any compliant provider must implement. EclipseLink is one such provider, and specifically the reference implementation, meaning it's built alongside the specification itself and used to validate that the spec is implementable and unambiguous.
In practice this means EclipseLink implements everything JPA requires (entities, EntityManager, JPQL, the Criteria API) and then layers a large set of EclipseLink-specific extensions on top, things like fetch groups, native query hints, and advanced caching controls, that go beyond what the specification mandates.
An application that sticks strictly to standard JPA annotations and APIs can, in principle, switch persistence providers (say, from EclipseLink to Hibernate) with minimal code changes; the moment it uses EclipseLink-specific extensions, that portability is traded for extra capability.
More Related questions...