Home > Articles > Programming > Java

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

1.5 EJB roles

An interesting feature of the EJB Specification is that its requirements are largely divided into different 'roles.' When reading the Specification, it is therefore quite clear to whom the various requirements correspond.

Component provider The component provider [EJB2.0 25.1] is a software developer who authors EJBs. These EJBs may be destined for a particular application, or they may be general-purpose or part of a software library. The EJB author may not know the names of the EJBs with which it is to interact although, of course, their method specifications must be known. Similarly, the EJB author may not know the names of external resources like databases.

The Specification indicates how the component provider uses the XML deployment descriptor to indicate that these EJBs and resources are required, and the names by which it has referenced them.

Application assembler The application assembler [EJB2.0 25.2] is someone who builds an application out of component EJBs. The same person or people may be operating in this role as are fulfilling the component provider role, but the Specification is quite clear that the two are distinct jobs. The application assembler resolves references between EJBs, unifies the references to external resources, and packages the components into a single file ready for deployment.

It is slightly confusing for the newcomer to EJB development that most of the graphical tools used for building EJB applications don't distinguish between what they are doing in the provider role versus in the assembler role. It often appears that the developer is supplying redundant information or information that is duplicated; this is because the deployment descriptor being built does support the notion of a separate provider and assembler, even if they are in practice the same person.

Deployer The deployer [EJB2.0 25.3] takes a file from the application assembler that contains the EJBs and other components required for the application and installs it on the server, making appropriate customizations for the site.

These customizations include replacing database references with real database information, mapping the security roles in the application onto real users and groups in the organization, and supplying values for other configuration parameters.

Server vendor The server vendor supplies EJB server products. An EJB developer should not assume that the sections in the EJB Specification that deal with the responsibilities of the server vendor are not of interest. On the contrary: The server sets the operating environment of the EJB, and this section of the EJB Specification gives the developer an insight into what environment the EJB can expect.

Administrator An administrator [EJB2.0 25.4] is a person responsible for the maintenance and performance tuning of an application.

Tool provider A tool provider authors EJB packaging and deployment tools.

  • + Share This
  • 🔖 Save To Your Account