Table of Contents
Generally speaking, two types of components can be developed for Geronimo: services and applications. Applications are J2EE applications or J2EE application modules, including:
J2EE application clients
J2EE enterprise applications
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:
The ActiveMQ JMS Server
Geronimo security realms
The Geronimo logging system
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.
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.