Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Geronimo is in the first place a Java^TM^ 2 Platform Enterprise Edition (J2EE) application server, but can be seen as a general service container. The main focus of developing Geronimo was the managing and scaling of application servers. Geronimo's intention was never to re-implement a servlet or an EJB container, but to use existing open source applications (mainly from Apache http://www.apache.org/) whenever possible, plug it together and build a new application server.

Anchor
Geronimo extended by a monitor component
Geronimo extended by a monitor component


The standard Geronimo distribution comes with Apache Tomcat http://tomcat.apache.org/ and EJB container (OpenEJB http://incubator.apache.org/openejb/) component. Extending Geronimo by a monitoring component, developed for this paper, is like Tomcat, or any other component as long as they are GBeans, as shown in the Figure: #Geronimo extended by a monitor component. The fundamental entity within Geronimo are Geronimo Beans (GBeans).

Geronimo Beans
Anchor
Geronimo Beans
Geronimo Beans

Everything in Geronimo is basically a Geronimo Bean (GBean). Geronimo's kernel handles these GBeans and stores them in it s repository. By default Geronimo uses not a database but a file directory named repository.

Anchor
Geronimo GBeans
Geronimo GBeans

Image Added
Users can install their own GBeans by describing them with a deployment plan and deploy them into Geronimo by using the GBeanBuilder (see Fig. #Geronimo GBeans). Every GBean must implement the GBeanLifecycle interface. This interface defines three methods: doStart(), doStop(), doFail() as you see in the class diagram (Fig. #Class diagram of the management component example). The GBeanLifecycle interface is the contract between the Geronimo plug-in framework and our application, the GBean. The Geronimo framework uses dependency injection (see Fowler: Inversion of control containers and the dependency injection pattern, Frod: Dependency injection in apache geronimo, part 1, Dependency injection in apache geronimo, part 2) to set GBean parameters during the deployment process. There are two ways to inject information during the deployment process of GBeans:

  1. getter/setter injection: framework injects information using the setter and getter methods of the GBean.
  2. constructor injection: framework injects information using the constructor of the GBean, when it is instantiated.

The example of this article is using constructor injection to pass the servlet MBean names and the MBean server reference to the monitor GBean.

References