Chapter 10. Development & Deployment Overview [DRAFT (1.0)]

Table of Contents

10.1. Component Development
10.2. J2EE Deployment Descriptors
10.3. Geronimo Deployment Plans
10.3.1. Necessity of Deployment Plans
10.3.2. Deployment Plan File Names & Packaging
10.4. The Deploy Tool
10.4.1. Deploy Tool Capabilities
10.4.2. Deploy Tool Concepts
10.4.3. Deploy Tool Syntax
10.4.4. Remote Deployment
10.4.5. Deploy Tool Troubleshooting
10.5. Maven 1.x Deployment Plugin
10.5.1. Deployment Plugin Commands
10.5.2. Deployment Plugin Example
10.6. JSR-88 Configuration & Deployment Tools
10.6.1. Connecting a Tool to Geronimo

Generally speaking, two types of components can be developed for Geronimo: services and applications. Applications are J2EE applications or J2EE application modules, including:

Services are other components that can be loaded into a Geronimo server, providing services to applications, or affecting the behavior of Geronimo itself. Some of the services discussed already include:

While the overall process for developing and deploying services and applications is very similar, the specific configuration options vary. This chapter covers the common process and the related tools that ship with Geronimo. The rest of the chapters in this part of the book discuss the specific configuration options for each type of J2EE application module. Chapter 18, GBeans: Adding New Services to Geronimo [EMPTY] discusses the specific configuration process for services, as opposed to application components.

10.1. Component Development

Every application component must be developed and packaged according to the appropriate J2EE specifications. For example, the web application specification covers what base classes a Servlet should extend, the structure of a web application archive (with libraries under WEB-INF/lib, etc.), rules the web components should follow, and more. Any component that is developed, packaged, and configured according to those rules and guidelines can be deployed to Geronimo. Though the specifics are outside the scope of this book, there are many good references on J2EE application development.:

Developing services is described in more detail in Chapter 18, GBeans: Adding New Services to Geronimo [EMPTY]. As with application modules, there are certain rules that must be followed for the service to be a legitimate GBean, which is the type of component that Geronimo can deploy and run. Fortunately there are fewer rules here, and the configuration of a GBean is more open-ended compared to the J2EE deployment descriptors required for an application component. But this is a two-edged sword, as even two very similar or interchangeable GBeans may have very different implementation strategies and very different configuration strategies.

The bottom line is that in either case, you must develop a component according to the established rules. In some cases your IDE may be able to point out where you have deviated, but in others, any mistakes may not be revealed until you either deploy the component or actually attempt to start it. Generally any development errors can be reported when you first attempt to deploy a component, and it's usually the configuration problems that are not revealed until the component is actually started. For example, it's quite easy for the deployer to validate that a servlet actually implements javax.servlet.Servlet, but it's impossible to tell whether a database the servlet relies upon will be available when the servlet is eventually started.