Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


advertisement
 

Exploring Geronimo's GBean Framework

Apache Geronimo is a general runtime execution environment and certified J2EE application server that you can configure to satisfy many different infrastructure requirements.


advertisement
eronimo is built around an Inversion of Control (IoC) kernel that consumes and manages components called GBeans. The GBean framework is the vehicle by which new behaviors are added to the Geronimo kernel. Almost everything in Geronimo—including containers, adapters, and applications—is a GBean.

This article introduces you to the GBean framework architecture and shows you how to build and deploy a simple GBean.

Introducing Apache Geronimo
Apache Geronimo is an enterprise-grade J2EE application server created from the efforts of a vast worldwide community of Java open source developers.

In addition to being a powerful J2EE application server, Apache Geronimo provides an extremely modular and loosely-coupled infrastructure allowing pieces of the infrastructure to be used only as needed.

Apache Geronimo combines its modular infrastructure with outstanding open source technologies to support current J2EE specifications. Some of these technologies include:

Part of Geronimo's powerful infrastructure includes an IoC-based framework for creating loosely-coupled, configurable, runtime environments from components known as GBeans. Runtime environments in this context refer to any situation needing to load, execute, and manage Java objects in order to fulfill a specific technological scenario. Scenarios might include: entire distributed messaging platforms; small, discrete kernels for object pooling frameworks; clustering frameworks; plug-in capable desktop applications; and others. The powerful benefit derived from using this GBean-based framework is that the concepts and component interactions remain constant for each scenario.

The following sections discuss the components and structures of the Geronimo GBean framework.

 
Figure 1. Geronimo Basic Architecture: The figure shows the basic architecture of the Geronimo GBean framework, along with the persistence framework.
Introducing Geronimo's GBean Framework
The Geronimo GBean framework facilitates Java-based execution environments by defining their capabilities through a configuration of components known as GBeans. At the heart of each execution environment is a GBean component known as the kernel that consumes and manages other GBeans.

The kernel manages GBean dependencies, state, and lifecycle. A GBean relies on the kernel to "inject" dependencies into the GBean at runtime according to rules defined in a configuration file called a deployment plan. The following code is an example of a GBean declaration within a deployment plan:

<gbean name="MyGBean" class="com.example.MyGBean"> <attribute name="message">buenos dias</attribute> <attribute name="author">Jeff Hanson</attribute> <attribute name="purpose">Simply for show</attribute> </gbean>

GBeans execute around a lifecycle that defines specific execution states in respect to the kernel to which they are deployed.

Figure 1 illustrates the basic architecture of the Geronimo GBean framework, along with the persistence framework.



Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap