O'Reilly logo

Beginning Java™ EE 6 Platform with GlassFish™ 3 by Antonio Goncalves

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 6. Enterprise Java Beans

The previous chapter showed how to implement persistent objects using JPA and how to query them with JPQL. The persistence layer is developed using objects that encapsulate and map their attributes to a relational database, thanks to annotations. The idea is to keep the entities as transparent as possible and not intermingle them with business logic. Entities can have methods to validate their attributes, but they are not made to represent complex tasks, which often require an interaction with other components (other persistent objects, external services, etc.).

The persistence layer is not the appropriate layer for business processing. Similarly, the user interface should not perform business logic, especially ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required