Home > Articles

Overview of EJB

  • Print
  • + Share This
This chapter is from the book

Introduction to EJB

Enterprise Java Bean (EJB) is the component model for developing software components that are managed by the J2EE platform. The EJB specifications that outline the model also define the hosting environment responsible for managing the components (beans) at run time. The primary objective of EJB is to enable business application developers to focus their time developing the business functionality instead of building system functions such as multiuser support, transaction support, and so on. A typical EJB application developer does not need to know the system-level details of how the J2EE platform manages transactions, for example.

The EJB specifications handle the encapsulation and isolation of system interfaces by defining specific roles for EJB developers:

  • Enterprise bean provider

  • Application assembler

  • Deployer

  • EJB server provider

  • EJB container provider

  • System administrator

It is possible that some of these roles will be fulfilled by one entity instead of one entity for each role. For example, the enterprise bean provider and the application assembler could be the same team of programmers; or the EJB server provider and the EJB container provider can be the same vendor. Each role defined in the EJB specification has a set of contracts or interfaces that support the roles' responsibilities.

Notice that although the JCA specifications define specific roles, there is an overlap with the roles defined in the EJB specifications. The application assembler, deployer, and system administrator roles exist in JCA and EJB specifications. An application assembler will assemble the business application by tying together (assembling) relevant EJB components and JCA resource adapters. Hence, it is quite possible that in the context of a business application, an EJB component can call a JCA resource adapter, which in turn can call another EJB, and so on.

  • + Share This
  • 🔖 Save To Your Account