Appendix A. Deployment Plans

A deployment descriptor is an XML file that describes a Java EE module. It lists the Java EE components that make up the module and defines the environment for these components. Java EE components have access to a naming service called JNDI, which is used to decouple the component from the resources and other components that it uses. The process of mapping the actual resources to the references in the application is done by means of the Java EE deployment descriptors and server-specific deployment plans. By deployment plans, we refer to the server-specific XML files that help in deployment. These files can be created by tooling or by hand.

The different types of deployment descriptors, as specified in the Java EE specifications, are as follows:

  • Web deployment descriptor: This file should be named web.xml, and should be present in the WEB-INF directory of your web module.

  • EJB deployment descriptor: This file should be named ejb-jar.xml, and should be present in the META-INF directory of the EJB module.

  • Application deployment descriptor: This file should be named application.xml, and should be present in the META-INF directory of the EAR file in which the application is packaged.

  • Application Client deployment descriptor: This file should be named application-client.xml, and should be present in the META-INF directory of the application client module.

  • Resource Adapter deployment descriptor: This file should be named ra.xml, and should be present in the META-INF directory of the resource adapter module.

There are Geronimo-specific deployment plan counterparts for each of the Java EE 5 deployment descriptors. These are given below:

  • Web deployment plan: This file should be named geronimo-web.xml, and should be present in the WEB-INF directory of your web module. This maps the resource references in the web.xml file to server resources.

  • EJB deployment plan: This file should be named openejb-jar.xml, and should be present in the META-INF directory of the EJB module. This maps the resource references in the ejb-jar.xml file to resources on the server.

  • Application deployment plan: This file should be named geronimo-application.xml, and should be present in the META-INF directory of the EAR file in which the application is packaged.

  • Application Client deployment plan: This file should be named geronimo-application-client.xml, and should be present in the META-INF directory of the application client module.

  • Resource Adapter deployment plan: This file should be named geronimo-ra.xml, and should be present in the META-INF directory of the resource adapter module.

An external deployment plan can also be specified during deployment. In this case, the plan file can have any name, and will override any deployment plan packaged within the archives.

Deployment plans are used to deploy services such as security realms into Geronimo. If the Service deployment plan is provided internally in the Java archive, it should be named geronimo-service.xml, and located under the META-INF directory.

All deployment plans use some common elements, such as environment and gbean definitions. In this appendix, we will examine these common elements.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset