The Pros and Cons of EJB

There is a case to be made for using EJBs in certain situations. It's important to identify those cases so that you can make a valid assessment regarding whether your project is a good candidate for an EJB deployment.

For example, do you have an absolute requirement for distributed computing? One of EJB's major selling points is that it allows you to keep all your business logic and database access in a central location. This means that you can greatly reduce the possibility that two applications will implement the same business logic in two different ways. It also means that you have only a single location to change when you need to update business logic.

However, don't be faked out by salespeople or your local head-in-the-clouds ...

Get MySQL™ and JSP™ Web Applications: Data-Driven Programming Using Tomcat and MySQL now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.