GlassFish-Corba 

This project contains the source code, documentation, and tests for the CORBA ORB that is used in the GlassFish application server project.  The GlassFish ORB complies with the CORBA 2.3.1 specification, and with the CORBA 3.0 specifications for the Interoperable Name Service and Portable Interceptors. It includes both IDL and RMI-IIOP support. The GlassFish ORB has an open, extensible architecture that supports flexible configuration and extension through an open SPI. This ORB is written completely in Java.

Special Features of the GlassFish ORB

This ORB has a number of special features specifically for GlassFish:

  1. An optimized, streaming transport for GIOP 1.2 that uses NIO select for scalability.
  2. An implementation of RMI-IIOP that uses runtime bytecode generation to avoid the need for the rmic compiler for either stubs or skeletons.
  3. An optimized fast object copier to speed up co-located RMI-IIOP calls that require pass-by-value semantics for argument passing.
  4. Highly optimized colocated RMI-IIOP calls that short circuit most of the ORB object adapter and transport code for speed.
  5. The ORB architecture is based in part on the PEPt work by Harold Carr (a former member of the ORB team), that provides clean separation between protocol, encoding, presentation, and transport without impacting performance.
  6. The ORB includes a code generation library (codegen) that supports runtime generation of classes from a high-level java-like API. This is currently used to generate the classes needed to support the remote view for EJB 3.
  7. Support is included for dynamic failover and load balancing of IIOP requests.

Documentation

The ORB documentation is available here (including JavaDocs).

Getting the source code

The ORB source code is now managed using Mercurial. It is hosted at Kenai.com as the GlassFish Version 3 CORBA ORB project.

There are several source code repositories available at the GlassFish CORBA site on Kenai: See the sources page for the details. The repositories are used as follows:

The java.net subversion repository contains only the documents in the www directory, so that the docs can be displayed automatically from the glassfish-corba project.  This repository also contains the JavaDocs, which are generated in the build process when synchronizing the internal and external repositories.

The intended model for developing GFv3 CORBA is that all changes are pushed first to the staging repository, where they are tested using Hudson. After the Hudson tests pass, the changes will then be pushed to the master repository, where they may be checked out and viewed by anyone. However, this is not fully in place yet, and I am still doing direct pushes to the master repository.

Building the Project

The simplest thing to do is to use NetBeans:

  1. Make sure you have NetBeans 6.9.1 or later installed.
  2. Select versioning->mercurial->clone other.
  3. Type in the URL for the master repository (https://kenai.com/hg/gf-corba-v3-mirror~master).
  4. Pick a location to create the local clone.
  5. Create a project from the clone (this is also doing the hg clone, which takes a little while).
  6. Open the cloned project as the main project.
  7. Use NetBeans to build and run tests as desired. Use the right-click menu on the project to get to the CORBA-specific targets, such as all of the different test-related targets.

The typical build time should be 30-60 seconds depending on your hardware. The test time is variable, but running all of the tests should not take more than around 45 minutes.

More details (and other options) are described here (pdf) in the ORB documentation.

Obtaining ORB builds

For GlassFish v31, all of the ORB files are contained in the GlassFish appserv-rt.jar file. You can get this by installing glassfish from the GlassFish downloads.

The ORB packaging is completely different for GFv3. The ORB is now delivered in several OSGi bundles:

These bundles are available in the Sun Maven 2 repository, with a GroupId of com.sun.corba. The current version is 3.1.0.b027.

Planned Work

There are a number of efforts underway right now to improve the ORB following the GF 3.1 release:

  1. Further extend the ORB monitoring Gmbal implementation.
  2. Replace most of the ORB transport with Grizzly, which will include improved CSIv2 (SSL) scalability and improved ORB connection caching. Most of the Grizzly performance features are already in the current ORB transport, but moving to a single transport has many benefits for code quality, integration, and further optimizations.
  3. The encoding performance has been improved for the GlassFish v31 version of the ORB. This is still in progress, and more details will appear first in the CORBA blog.
  4. Improve the internal code generation library (codegen). Codegen provides a java-level API for generating classes at runtime. This is used for things like generating the EJB 3 remote view from a EJB 3 POJO business interface. Planned improvements include:

Here are some additional items that we plan to work on (some will only take a few days, some may take several months):

  1. Use TestNG to drive the CORBA test framework, so that we can use TestNG's parameterization and grouping capabilities to improve our test coverage.
  2. Fix redundant IDL and RMIC compilation problems with the tests.
  3. Improve the documentation coverage, particularly in the ORB Notes Document.
  4. Make more extensive use of the internal ORB timer library to support ORB microbenchmarks as regression tests.
  5. As always, fix bugs.