O'Reilly logo

Java Enterprise in a Nutshell, Third Edition by William Crawford, Jim Farley

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

Deploying EJBs

As with web components (servlets and JavaServer Pages), EJB components in the J2EE environment are packaged into jar files, and the components are described and configured within an application server using deployment descriptors that are included in these jar files. These deployment descriptors are based on an XML DTD that is published as part of the EJB specification. An overview of J2EE deployment concepts can be found in Chapter 2. In this section, we discuss some EJB-specific deployment details that complement the material in Chapter 2.

Once you’ve written the home and remote interfaces and the implementation of your enterprise bean, you need to deploy your beans in an EJB container, which involves the following steps:

  1. Specify the deployment information and options for your bean, in the form of an XML file called an EJB deployment descriptor. The information in this deployment descriptor includes the names of classes that serve as the client interfaces, the home interfaces, and implementation for your EJB as well as any transaction support options, access control settings, and so on. In addition to the basic deployment information, different types of EJBs (session, entity, message-passing) require different sets of additional metadata (e.g., data mappings for container-managed entity beans and session timeouts for session EJBs).

  2. Provide any vendor-specific deployment information beyond the information in the standard J2EE deployment descriptor. Some EJB container ...

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