Multiple choice technology architecture

You are building a new Customer Relationship Management system. You have developed the design model and planning to choose persistence mechanism. The model has complex relationships between tables. You do not want any persistence mechanism code to be present in business objects.Which of the following technologies would you choose?

  1. Java Persistence API

  2. CMP entity bean

  3. BMP entity bean

  4. DAO

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

For a CRM system with complex relationships and the requirement to keep business objects free of persistence code, Java Persistence API (JPA) is the best choice. JPA handles complex relationships through annotations (OneToMany, ManyToOne, etc.) and keeps persistence logic separate from business objects using the repository pattern or EntityManager. CMP 2.x entity beans are too complex and invasive. BMP requires persistence code in beans. DAO is a pattern, not a complete persistence solution like JPA.