What does EJB really give me?
EJB lets you focus on the business logic for your business, and leave the underlying services (transactions, networking, security, etc.) to the EJB server vendor.
Imagine you work for Guitar Land, a company that sells musician’s gear online. You have better things to do than work 90 hours a week, so where would you want to spend your time? Wouldn’t you rather concentrate on how Guitar Land does business online, as opposed to writing your own secure, networked, transaction management server? Why not work on what you know best (business logic for your particular business), and leave the heavy lifting (i.e. the big infrastructure services you get from the server) to someone else?
The EJB model is to let everyone do what they do best—the server vendors concentrate on the infrastructure that most enterprise applications need, while the business developers concentrate on their own business logic.

EJB let’s you customize and configure reusable components at deploy-time, without touching the source code!
You can change the way a bean uses the underlying services simply by tweaking an XMl document at deploy-time. For example, you can completely define the security access control for a bean’s methods within XML (declaratively) rather than within the bean’s source code (programmatically). And you can customize the way a bean’s methods run in transactions, all within ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access