What is EJB all about?
Component-based development
With enterprise javabeans, you can develop building blocks—EJB components—that you or someone else can assemble and reassemble into different applications. For example, you might create a Customer bean (bean is another word for component) that represents a customer in a database. You can use that Customer bean in an accounting program, an e-commerce shopping cart system, a tech support application, or virtually any other application that might need to represent a customer. In fact, with some beans, the bean developer and the application assembler might not work for the same company or have any knowledge of one another.
If you’re a bean developer, you might build an Order bean, or a Payroll bean, or a ShoppingCart bean that developers in some unrelated company can buy and use to construct their own custom applications.
One beauty of component-based development is that you take code reuse to a whole new level. Instead of reusing Java classes, you get to reuse a bigger chunk of functionality. Often, you can modify the way a bean works without ever touching its Java code! You’ll learn in this chapter that when you deploy a bean into a server, you can configure and customize the bean declaratively—through an XML-based deployment descriptor—to change the way the bean behaves at runtime.
With component-based development, you take code reuse to a whole new level. With OO development, you reuse classes, but with components, you reuse a bigger ...
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