You can use deploytool to examine and alter deployment descriptor information for the application and, if necessary, for individual components, such as EJBs.
After you open an EAR file, the enterprise application will be selected and deployment information appropriate to the application is available in the tabbed dialog pages in the right pane. In Figure 4.3, clicking on the key icons to the left of each item has exposed the nested structure of the information.
Figure 4.3 shows that the application has three components:
The right General pane in Figure 4.3 shows the files comprising the Agency application as follows:
The remaining tabbed dialog-pages in the application pane will be discussed in later days in this book.
With the agency application selected in the left pane you can use the Tools, Descriptor Viewer, Descriptor Viewer menu option to examine the application.xml deployment descriptor shown in Listing 4.6. You can also use the Tools, Descriptor Viewer, Application Server Descriptor... menu to view the Sun Specific deployment descriptor.
Figure 4.4 shows the EJB JAR specific information with the contents of the JAR file expanded in the right pane.
The right General pane in Figure 4.4 shows the files that compose the Agency EJB JAR:
With the Agency EJB JAR file selected in the left pane you can use the Tools, Descriptor Viewer, Descriptor Viewer menu option to examine the ejb-jar.xml deployment descriptor shown in Listing 4.5. You can also use the Tools, Descriptor Viewer, Application Server Descriptor... menu to view the Sun Specific EJB deployment descriptor.
Drilling down further into the EJB, Figure 4.5 shows the Agency Session bean itself.
In Figure 4.5 the General tab shows the bean type and component classes for the Agency Session bean. This information is provided when the bean is created and cannot be changed thereafter. Creating a Session bean is discussed on Day 5. However, most of the configuration information for a bean can be changed through the remaining tabbed dialog pages shown in Figure 4.5.
Table 4.1 shows the basic categories of information that can be provided for an EJB.
Table 4.1 EJB DD Categories.
The Agency EJB illustrates common requirements for most EJBs. The use of environment references is shown in Figure 4.6, where the displayable Agency name is stored as a String environment reference. The data source definition for the Agency database is shown in Figure 4.7.
Finally, you can examine the simple application client in the Agency EAR file. In Figure 4.8, the main dialog page for an application client has been selected to show the entry for the Main Class name.
In Figure 4.8, you can see that an application client has similar configuration requirements as an EJB. Most of the tabbed dialog pages available are the same as those for an EJB. Figure 4.9 shows the configuration of the Agency Session EJB reference defined for the simple client.
blog comments powered by Disqus