|
Special Edition Using Enterprise JavaBeans 2.0 Authors: Cavaness Ch., Keeton B. Published year: 2000 Pages: 150-151/223 |
Deployer ResponsibilitiesPart of the deployer's job is to complete any deployment information that wasn't supplied by the application assembler. There also might be changes needed to environment entries that were supplied but don't reflect the true target environment. The deployer must ensure that all EJBs referenced by the application are present in the environment and that all required resources are available and accessible. Much of what the deployer must do is outside the bounds of entering data into the deployment descriptor. The deployer is instead responsible for using tools specific to the application server and the rest of the target environment to support the references declared in the descriptor. For example, the deployer must bind data sources to any connection factory references that exist. If the authorization method for a resource ( res-auth ) is specified as Container , the deployer must also supply the necessary login information. Any referenced administered objects, such as JMS queues or topics, must be configured and made available to the application as well. A significant responsibility of the deployer is to take the logical security roles specified by the application assembler and map them to the actual security domain of the target environment. This includes assigning the principals and groups recognized by the target environment to the application assembler's security roles. Security topics are discussed in more detail in Chapter 14, "Security Design and Management." The important point to remember about the work of the deployer is that much of it is vendor specific. The deployer will often be working with supplemental deployment files, such as WebLogic's weblogic-ejb-jar.xml file, and other configuration data used by the application server to bind an EJB application to the resources and security mechanisms it requires.
Note Vendors typically will have a different name for their proprietary deployment descriptor. For example, the deployment descriptor for the Orion EJB server is called orion-ejb-jar .xml . Summary of ResponsibilitiesTable 15.4 summarizes the deployment responsibilities assigned to each of the applicable EJB roles. Table 15.4. Deployment Responsibilities by EJB Role
|
Packaging EJBsEJBs and their deployment descriptor are passed between the EJB roles and eventually deployed using an ejb-jar file. This JAR file contains
As a bean provider, you can create an ejb-jar file by following these steps:
The preceding example creates a new JAR file that contains the deployment descriptors and all class files under the com directory. If that includes files you don't need in the JAR, you can restrict the contents using path specifications such as com\que\ejb20\auction\model\*.class. The ejb-client FileThe EJB specification also defines the concept of an ejb-client JAR file. This is a JAR you can create that holds only the class files that a client application needs to access the beans included in a corresponding ejb-jar file. This JAR would include the home and component interfaces, any primary key classes, any custom application exceptions exposed to the client, and the client stubs generated by the container. If you create this file, you can reference it in the ejb-client-jar element of ejb-jar using a pathname relative to the location of the ejb- jar file. The EJB specification doesn't dictate any required support for this file by an application server, but it is a convenient way for you to package the class files needed to deploy your client applications. |
|
Special Edition Using Enterprise JavaBeans 2.0 Authors: Cavaness Ch., Keeton B. Published year: 2000 Pages: 150-151/223 |