O'Reilly logo

Enterprise JavaBeans 3.0, 5th Edition by Bill Burke, Richard Monson-Haefel

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 21. EJB Design in the Real World

EJB has changed rapidly over the past couple of years with the introduction of EJB 3.0 and Java Persistence. Best practices for using EJBs "in the real world" are just now being documented, and already entire books have been written on how to use them. We cannot hope to cover everything in a single chapter. However, we can hit on the important topics regarding designing EJBs for use in real-world business applications.

This chapter covers:

  • The questions you need to ask about your EJB container, persistence provider, and database selections before you begin designing your EJBs and entity beans.

  • A step-by-step how-to for designing EJBs and entities from functional requirements to completed design, including the identification of potential base classes and EJB-helper classes.

  • Alternatives to EJB. In some places, Enterprise JavaBeans are not the best choice. The last section in this chapter helps you identify those places and introduces some alternatives.

Predesign: Containers and Databases

Before you begin designing your application, it is essential that you consider the execution environment in which your code is run. The execution environment includes the following specifics regarding your system:

Hardware platform
Operating system
Java Virtual Machine (JVM) implementation
Application server (EJB container and persistence provider)
Database server

Each of these elements has a direct effect on your application design's success. We won't talk about hardware ...

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