Colorado Software Summit: October 24 – 29, 2004 © Copyright 2004, Jailey Solutions, LLC

Apache Geronimo: A Peek Under the Hood

Bruce Snyder Jailey Solutions, LLC

Bruce Snyder — : A Peek Under the Hood Page 1 Colorado Software Summit: October 24 – 29, 2004 © Copyright 2004, Jailey Solutions, LLC

What Is Apache Geronimo? It is Not… It is… ƒ Yet another lightweight ƒ Designed for long container running servers ƒ Yet another web ƒ Designed to tolerate framework partial component ƒ Yet another AOP failures framework ƒ System oriented ƒ An MVC framework services

Bruce Snyder — Apache Geronimo: A Peek Under the Hood Page 2 Colorado Software Summit: October 24 – 29, 2004 © Copyright 2004, Jailey Solutions, LLC

From the Ground on Down ƒ Open Source Enterprise Infrastructure ƒ Highly modular architecture ƒ Initial manifestation as a J2EE Server ƒ Other possible configurations ¾Native Spring Integration ¾Bi-directional PicoContainer Integration ¾Native Portlet Integration ¾Native Web Services Integration ¾Deployment Chaining ¾and many more …

Bruce Snyder — Apache Geronimo: A Peek Under the Hood Page 3 Colorado Software Summit: October 24 – 29, 2004 © Copyright 2004, Jailey Solutions, LLC

Geronimo Kernel ƒ Fundamental Core ¾Small memory consumption ~150KB code ¾Component Configuration ¾Component Registration ¾Integrated Repository ¾Lifecycle Control ¾Dependency Manager ƒ Components are called GBeans ¾Simple object, plus some metadata

Bruce Snyder — Apache Geronimo: A Peek Under the Hood Page 4 Colorado Software Summit: October 24 – 29, 2004 © Copyright 2004, Jailey Solutions, LLC

What Are GBeans? ƒ A J2EE managed object (MBeans) ƒ Used to bridge JSR-77 lifecycle requirements ƒ GBean wrappers allow just about anything to be plugged in to Geronimo ƒ Implement the GBeanLifecycle interface

public interface GBeanLifecycle { void doStart() throws WaitingException, Exception; void doStop() throws WaitingException, Exception; void doFail(); }

Bruce Snyder — Apache Geronimo: A Peek Under the Hood Page 5 Colorado Software Summit: October 24 – 29, 2004 © Copyright 2004, Jailey Solutions, LLC

What Are GBeans? (Continued)

Bruce Snyder — Apache Geronimo: A Peek Under the Hood Page 6 Colorado Software Summit: October 24 – 29, 2004 © Copyright 2004, Jailey Solutions, LLC

GBean Archive ƒ A JAR file containing: ¾Persisted GBean instances ¾GBean metadata ¾Required classes reside: • Either in the jar, or • As dependencies from a central repository ƒ Must have a unique ID ƒ Can be signed for distribution ƒ Can be executable

Bruce Snyder — Apache Geronimo: A Peek Under the Hood Page 7 Colorado Software Summit: October 24 – 29, 2004 © Copyright 2004, Jailey Solutions, LLC

GBean Descriptor Example ƒ Provides IoC configuration for a GBean ƒ elements can be placed in any descriptor - usually geronimo-application.xml

Bruce Snyder — Apache Geronimo: A Peek Under the Hood Page 8 Colorado Software Summit: October 24 – 29, 2004 © Copyright 2004, Jailey Solutions, LLC

Demo (Time Permitting) ƒ Demonstrate simple GBean wrapper

Bruce Snyder — Apache Geronimo: A Peek Under the Hood Page 9 Colorado Software Summit: October 24 – 29, 2004 © Copyright 2004, Jailey Solutions, LLC

Repository ƒ Structured collection of jars ¾Designed to work in conjunction with Maven • Pluggable implementation ¾Every jar has a unique group and artifact ID, e.g. • geronimo-spec • geronimo-j2ee-1.4-RC2 ƒ Default repository is local file system ¾Others allow auto-download

Bruce Snyder — Apache Geronimo: A Peek Under the Hood Page 10 Colorado Software Summit: October 24 – 29, 2004 © Copyright 2004, Jailey Solutions, LLC

Basic Configuration Builder ƒ Deployers are J2EE specific ¾JSR-88 ƒ Builders are Geronimo specific ¾Create configuration objects containing GBeans ¾Serialized to a file upon shutdown ƒ From a pure GBean configuration ¾Very raw – used to bootstrap a server ¾You specify GBeans in an XML descriptor ¾Not intended for end users

Bruce Snyder — Apache Geronimo: A Peek Under the Hood Page 11 Colorado Software Summit: October 24 – 29, 2004 © Copyright 2004, Jailey Solutions, LLC

Application Builders ƒ Two stages make up deployment (JSR-88) ¾Deployment • Read the ear file and the server config(s) ¾Distribution • Send the ear file and server config(s) to the server ƒ Geronimo handles both stages in single step for the user ƒ Application-specific configurations

Bruce Snyder — Apache Geronimo: A Peek Under the Hood Page 12 Colorado Software Summit: October 24 – 29, 2004 © Copyright 2004, Jailey Solutions, LLC

Application Builders (Continued) ƒ Most complex Builder is J2EE deployer ¾Implements JSR-88 deployment specification ¾Take EJB-jars, wars, rars ¾Add in a deployment plan (XML) ¾Output a Geronimo Configuration ARchive (.car) ƒ Can produce very complex GBean definitions ¾e.g. entire EJB gets mapped to a GBean ƒ Allows for deploy-time optimizations ¾e.g. Precompile EJBQL, MessageSelectors, etc.

Bruce Snyder — Apache Geronimo: A Peek Under the Hood Page 13 Colorado Software Summit: October 24 – 29, 2004 © Copyright 2004, Jailey Solutions, LLC

Configurations

EAR EJB WAR

Local Environment Hot (DataSources, etc.) RAR Pico Pico Spring App Swap J2EE Configuration Pico Spring (, OpenEJB, ActiveMQ) Config Config

System Services (Logging, URL Handler, XML Catalog) Cold Swap Geronimo Kernel (Lifecycle, Config Manager, Repository)

Bruce Snyder — Apache Geronimo: A Peek Under the Hood Page 14 Colorado Software Summit: October 24 – 29, 2004 © Copyright 2004, Jailey Solutions, LLC

Running the Server

$ java –jar bin/server.jar

$ java –jar bin/server.jar

ƒ is a specific configuration to boot ƒ With M2, default is to restart all configurations that were running on last clean shutdown ƒ Maven Geronimo deploy plugin simplifies this greatly

Bruce Snyder — Apache Geronimo: A Peek Under the Hood Page 15 Colorado Software Summit: October 24 – 29, 2004 © Copyright 2004, Jailey Solutions, LLC

Geronimo Community

Geronimo MX4J

JOTM

ActiveMQ OpenEJB

cglib Jetty TranQL

ActiveCluster

Bruce Snyder — Apache Geronimo: A Peek Under the Hood Page 16 Colorado Software Summit: October 24 – 29, 2004 © Copyright 2004, Jailey Solutions, LLC

Jetty ƒ Well established ƒ Implements Servlet 2.4 specification ƒ Designed for embedding and high performance

ƒ Why not yet? ¾No real reason, just hasn’t been done yet

Bruce Snyder — Apache Geronimo: A Peek Under the Hood Page 17 Colorado Software Summit: October 24 – 29, 2004 © Copyright 2004, Jailey Solutions, LLC

OpenEJB ƒ Well established EJB container ƒ Upgraded from 1.1 to 2.1 specification ¾No, it doesn’t do EJB3 (yet) ƒ Fully integrated into Geronimo ƒ Optimized for highly concurrent workloads

Bruce Snyder — Apache Geronimo: A Peek Under the Hood Page 18 Colorado Software Summit: October 24 – 29, 2004 © Copyright 2004, Jailey Solutions, LLC

ActiveMQ ƒ Yes, it’s another JMS implementation ¾Looked at OpenJMS and JORAM ¾Needed BSD, JMS1.1 and JCA1.5 ƒ Designed for performance ¾NIO ¾Content based routing ¾Rules based routing (drools)

Bruce Snyder — Apache Geronimo: A Peek Under the Hood Page 19 Colorado Software Summit: October 24 – 29, 2004 © Copyright 2004, Jailey Solutions, LLC

TranQL ƒ Framework for Persistence Frameworks ƒ Common data model across frameworks ƒ Multiple front ends: ¾EJB CMP, JDO, Castor, JDBC, Groovy DO ƒ Multiple back ends: ¾SQL92, SQL03, XML, LDAP, JCA

Bruce Snyder — Apache Geronimo: A Peek Under the Hood Page 20 Colorado Software Summit: October 24 – 29, 2004 © Copyright 2004, Jailey Solutions, LLC

MX4J ƒ Well established JMX implementation ƒ Fully compliant JMX and JMX Remote API (JSR-160) ƒ Highly robust ƒ Widely used

Bruce Snyder — Apache Geronimo: A Peek Under the Hood Page 21 Colorado Software Summit: October 24 – 29, 2004 © Copyright 2004, Jailey Solutions, LLC

ObjectWeb JOTM ƒ Java Open Transaction Manager ƒ Well established transaction manager ƒ Implements the JTA API ¾Full XA support • RMI/JRMP • RMI/IIOP

Bruce Snyder — Apache Geronimo: A Peek Under the Hood Page 22 Colorado Software Summit: October 24 – 29, 2004 © Copyright 2004, Jailey Solutions, LLC

ActiveCluster ƒ Framework for creating cluster-based applications ƒ Small, simple implementation ƒ Pluggable service providers ¾Sockets ¾JMS ¾JGroups ¾Jabber

Bruce Snyder — Apache Geronimo: A Peek Under the Hood Page 23 Colorado Software Summit: October 24 – 29, 2004 © Copyright 2004, Jailey Solutions, LLC

cglib ƒ High performance code generation library ƒ Well established class enhancer ƒ Provides runtime byte code manipulation

Bruce Snyder — Apache Geronimo: A Peek Under the Hood Page 24 Colorado Software Summit: October 24 – 29, 2004 © Copyright 2004, Jailey Solutions, LLC

Security ƒ Built in at low level ¾Secure network protocols ¾Support security manager (sandbox) ƒ JAAS and JACC ¾Possible pluggable policy providers • HIPPA • SOX ƒ Kerberos integration (including .NET) ƒ integration (LDAP)

Bruce Snyder — Apache Geronimo: A Peek Under the Hood Page 25 Colorado Software Summit: October 24 – 29, 2004 © Copyright 2004, Jailey Solutions, LLC

Transactions ƒ Lightweight Transaction Manager ¾XA Coordinator ¾XATerminator for JCA transaction import ¾Logging (HOWL) and basic recovery ƒ Future is JOTM integration

Bruce Snyder — Apache Geronimo: A Peek Under the Hood Page 26 Colorado Software Summit: October 24 – 29, 2004 © Copyright 2004, Jailey Solutions, LLC

Project Status ƒ A top-level Apache project ƒ J2EE 1.4 CTS testing in progress ¾Three people working on certification ƒ Official unofficial release date: ?/?/2004 ¾Open Source: It’s done, when it’s done ƒ M1 milestone release in May ƒ M2 milestone release in August

Bruce Snyder — Apache Geronimo: A Peek Under the Hood Page 27 Colorado Software Summit: October 24 – 29, 2004 © Copyright 2004, Jailey Solutions, LLC

M2 Release Features ƒ Geronimo Kernel is stable ƒ Web integration complete ƒ OpenEJB stable ¾Mostly working, except some bits of CMP2.1 ƒ ActiveMQ stable ƒ Transaction and Connector Complete ƒ Enabled Hot (re)-deployment ƒ To-do ¾Finish web services, application client, CORBA

Bruce Snyder — Apache Geronimo: A Peek Under the Hood Page 28 Colorado Software Summit: October 24 – 29, 2004 © Copyright 2004, Jailey Solutions, LLC

Who Is Bruce Snyder? ƒ Independent software consultant ƒ Speaker at software conferences ¾JavaOne ¾ApacheCon ¾Colorado Software Summit ƒ The Castor Project (http://www.castor.org/) ƒ Apache Geronimo (http://geronimo.apache.org/) ƒ TranQL Project (http://tranql.codehaus.org/) ƒ Author ¾ Castor Live (SourceBeat Publishing)

Bruce Snyder — Apache Geronimo: A Peek Under the Hood Page 29 Colorado Software Summit: October 24 – 29, 2004 © Copyright 2004, Jailey Solutions, LLC

Project Contributors ƒ Aaron Mulder ƒ Alan Cabrera ƒ Bruce Snyder ƒ Dain Sundstrom ƒ Davanum Srinivas ƒ David Blevins ƒ David Jencks ƒ Geir Magnusson Jr ƒ Gianny D’Amour ƒ Greg Wilkins ƒ Jacek Laskowski ƒ James Strachan ƒ Jan Bartel ƒ Jason Dillon ƒ Jeremy Boynes ƒ Richard Monson-Haefel ƒ Jules Gosnell ƒ Srinath Perera ƒ Simone Bordot

Bruce Snyder — Apache Geronimo: A Peek Under the Hood Page 30 Colorado Software Summit: October 24 – 29, 2004 © Copyright 2004, Jailey Solutions, LLC

Q&A ƒ Open up for Questions and Answers

Bruce Snyder — Apache Geronimo: A Peek Under the Hood Page 31