The Caboteria / Tech Web / TechNotes > ProgrammingNotes > JavaNotes / GeronimoNotes (29 Jan 2008, TobyCabot)
The Apache group's j2ee server is called Geronimo. Here are some notes.

The home page is http://geronimo.apache.org/ and there's a wiki at http://wiki.apache.org/geronimo/.

Concepts

GBean

Geronimo is modular; it consists of a kernel and a set of components that implement the features needed to implement the J2EE specification. GBean (short for "Geronimo Bean") is the kernel-component interface. There's no GBean interface per se, but each GBean has a corresponding GBeanInfo object that describes the GBean and tells the kernel how to interact with it. Some GBeans implement GBeanLifecycle which allows them to get called when lifecycle events (start, stop, fail) happen. The source code for the GBeanTest class shows how a GBean is used.

GBeans are tracked using an MBeanServer (an MBean directory?).

According to mailing list traffic one advantage of GBeans over MBeans is that GBean method invocation is much faster.

Misc

Startup

Runs using a standalone application jar called target/bin/server.jar. The startup class specified in MANIFEST.MF is o.a.g.system.main.Daemon. The Daemon is a command-line wrapper around o.a.g.kernel.Kernel. The daemon first unserializes the META-INF/config.ser from server.jar using Configuration.loadGMBeanState(). The format of config.ser is a leading int that indicates how many attribute name/value pairs follow, then a leading int that indicates how many setReferencePatterns() parameter pairs follow:

        int attributeCount = ois.readInt();
        for (int i = 0; i < attributeCount; i++) {
            gbean.setAttribute((String) ois.readObject(), ois.readObject());
        }
        int endpointCount = ois.readInt();
        for (int i = 0; i < endpointCount; i++) {
            gbean.setReferencePatterns((String) ois.readObject(), (Set) ois.readObject());
        }

Deployment

Runs using a standalone application jar called target/bin/deployer.jar. The startup class specified in MANIFEST.MF is org.apache.geronimo.cli.deployer.DeployerCLI. DeployerCLI calls MainConfigurationBootstrapper.main() which calls DeployTool.execute().

EJB

Geronimo embeds OpenEJB as its EJB container, so there's a lot of good info at http://www.openejb.org/ that's also relevant to Geronimo, for example http://www.openejb.org/geronimo.html and http://openejb.codehaus.org/hello-world.html .

Geronimo's build process depends on downloading a copy of openejb from some site somewhere, and sometimes geronimo and openejb change simultaneously in ways that need to be closely coordinated. In that case you'll want to build openejb from source so that geronimo's build process can use your local openejb.

openejb's web site points to old source code, but according to http://hausmates.codehaus.org/projectinfo newer code seems to be located at:

  cvs -d :pserver:anonymous@cvs.openejb.codehaus.org:/home/projects/openejb/scm login
  (no password)
  cvs -d :pserver:anonymous@cvs.openejb.codehaus.org:/home/projects/openejb/scm cvs co openejb

Build openejb first, then geronimo.

Building

As of Oct 2006, the dev team has switched over to Maven2. A command-line build invocation that works for me is:

MAVEN_OPTS="-Xms256m -Xmx512m -XX:PermSize=64m -XX:MaxPermSize=256m" mvn -o 

To make the build go faster by skipping the unit tests add:

-Dmaven.test.skip=true -Dmaven.itest.skip=true

Command-line tools

For example, the deployer.

Code in modules/geronimo-deploy-tool/. This is referenced by configs/online-deployer/ that builds a "car" file.

Finally assembled in e.g. assemblies/geronimo-jetty-j2ee/. See src/main/assembly/bin.xml.

Misc

http://maven.apache.org/guides/mini/guide-mirror-settings.html

Edit | Attach | Print version | History: r26 < r25 < r24 < r23 < r22 | Backlinks | Raw View | Raw edit | More topic actions
Copyright © 2008-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding The Caboteria? Send feedback