Jump to content

Apache OpenEJB

From Wikipedia, the free encyclopedia
Apache OpenEJB
Developer(s)Apache Software Foundation
Initial releaseDecember 1999; 24 years ago (1999-12)
Stable release
7.0.3 / March 7, 2017; 7 years ago (2017-03-07)
Written inJava
Operating systemCross-platform
TypeEJB Container System
LicenseApache License 2.0

OpenEJB is an open-source, embeddable and lightweight Enterprise JavaBeans Container System and EJB Server, released under the Apache License 2.0. OpenEJB has been integrated with Java EE application servers such as Geronimo[1] and WebObjects.[2]



OpenEJB was founded by Richard Monson-Haefel and David Blevins in December 1999. At the time there were new vendors moving in the enterprise Java space seemingly every week. Rather than join the space as a competitor, the project was focused entirely on providing these new platforms with a way to quickly get EJB compliance via plugging OpenEJB into their application server.

The first to integrate OpenEJB in this fashion was Apple's WebObjects in late 2000, released in 2001. When the project moved to Source Forge in 2002 an Apache Tomcat integration was created. Again rather than follow what most in the industry were doing and putting Tomcat into OpenEJB, the project decided to follow its vision and provide an integration that allowed Tomcat users to plug in OpenEJB to gain EJB support in the Tomcat platform. It was in this same vein of putting an EJB container into a Web server that the project developed the Collapsed EAR concept of putting EJBs inside the .war file.

As part of the work that OpenEJB did to prepare for the integration with Apple's WebObjects, a very large integration test suite was developed. The test suite was developed as a generic application since it would need to be run against both WebObjects and other platforms that integrated OpenEJB. For simplicity in the build the test suite based on JUnit, was run with OpenEJB right inside the tests rather than as a separate process, which was easy to do as the container was designed to be plugged into other platforms and make as little assumptions about its environment as possible. It was from this work that the concept of combining an EJB application with plain unit tests and an embeddable EJB container was born. Originally referred to as a "local" EJB container and what lead the project to describe itself as being able to run in two modes: Local and Remote.

In August 2003 the project helped launch the Apache Geronimo application server. Originally a new version of OpenEJB was developed ground up based on Geronimo's GBean architecture and released as OpenEJB 2.0 which lived throughout the Geronimo 1.x cycle. In 2006 when EJB 3.0 was released which had a focus on simplicity, the project went back to its roots and revived the OpenEJB 1.0 codebase, ported select bits of the 2.0 codebase, and eventually brought it up to the EJB 3.0 spec level in what is now called OpenEJB 3.0.

Apache OpenEJB Versions
Version Release Date Description
0.01 (initial release) December 1999 Born in Exolab
January 2002 Moved to SourceForge.net
March 2004 Moved to Codehaus
September 29, 2006 Moved into the Apache Incubator
June 1, 2007 Graduated as Apache OpenEJB
4.7.3 December 4, 2015 Latest stable release

Major features

  • Supports EJB 3.0, 2.1, 2.0, 1.1 in all modes; embedded, standalone or otherwise.
  • Partial EJB 3.1 support
  • JAX-WS support
  • JMS support
  • J2EE Connector support
  • Can be dropped into Tomcat 5 or 6 adding various JavaEE 5 and EJB 3.0 features to a standard Tomcat install.
  • CMP support is implemented over JPA allowing to freely mix CMP and JPA usage.
  • Complete support for GlassFish descriptors allowing those users to embedded test their applications.
  • Incredibly flexible JNDI name support allows you to specify formats at macro and micro levels and imitate the format of other vendors.
  • Allows for easy testing and debugging in IDEs such as Eclipse, IntelliJ IDEA or NetBeans with no plug-ins required.
  • Usable in ordinary JUnit or other style test cases without complicated setup or external processes.
  • Validates applications entirely and reports all failures at once, with three selectable levels of detail, avoiding several hours' worth of "fix, recompile, redeploy, fail, repeat" cycles.
  • OSGi support[3]

See also