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:
- An optimized, streaming transport for GIOP 1.2 that uses NIO select for scalability.
- An implementation of RMI-IIOP that uses runtime bytecode generation to avoid the need for the
rmic compiler for either stubs or skeletons.
- An optimized fast object copier to speed up co-located RMI-IIOP calls that require pass-by-value semantics for argument passing.
- Highly optimized colocated RMI-IIOP calls that short circuit most of the ORB object adapter and transport code for speed.
- 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.
- 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.
- 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:
- GFv3 CORBA Master is the main repository for the GFv3 ORB.
- GFv3 CORBA Experimental is the repository for GFv3 ORB work that is not ready for integration into the main repository.
- GFv3 CORBA Staging is the repository used to stage updates to the GFv3 ORB. These changes will be pushed to the master repository after testing using Hudson (which is partially in place, but still needs some work). This repository cannot be viewed; it is for mercurial push operations only.
- GlassFish v31 ORB contains a copy of the code for the GFv31 ORB (it is not currently the main repository).
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:
- Make sure you have NetBeans 6.9.1 or later installed.
- Select versioning->mercurial->clone other.
- Type in the URL for the master repository (https://kenai.com/hg/gf-corba-v3-mirror~master).
- Pick a location to create the local clone.
- Create a project from the clone (this is also doing the hg clone, which takes a little while).
- Open the cloned project as the main project.
- 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:
- glassfish-corba-asm contains the version of ASM that the GFv3 ORB uses. This will eventually migrate to the version used in GFv3 so it can be shared.
- glassfish-corba-codegen contains the codegen and copyobject libraries, which provide a high-level runtime bytecode generation facility and generic
object copying library (the two have mutual dependencies).
- glassfish-corba-csiv2-idl contains the idlj-generated Java classes for the CSIv2 IDL definitions.
- glassfish-corba-dynamicany contains the Dynamic Any code for the ORB (which I'd like to load on demand at some point).
- glassfish-corba-internal-api contains the ORB FOLB API code.
- glassfish-corba-newtimer contains the ORB timer library.
-
- glassfish-corba-omgapi contains the GlassFish-specific versions of a few org.omg.* files.
- glassfish-corba-orb contains the main part of the ORB code.
-
- glassfish-corba-orbgeneric contains the main part of the ORB library (which is independent of the rest of the ORB).
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:
- Further extend the ORB monitoring Gmbal implementation.
- 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.
- 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.
- 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:
- Extend codegen with more language constructs (e.g. break, continue, switch)
- Add line number table and local variable table generation for debugging
dynamically generated classes.
- Complete method overload resolution support.
- Make the code generator API extensible (e.g. scheme-like macros).
- Make more extensive use of codegen in the ORB to improve performance.
- Provide more extensive utilities for generating Proxy-style classes.
Here are some additional items that we plan to work on (some will only take a few days,
some may take several months):
- Use TestNG to drive the CORBA test framework, so that we can use TestNG's
parameterization and grouping capabilities to improve our test coverage.
- Fix redundant IDL and RMIC compilation problems with the tests.
- Improve the documentation coverage, particularly in the ORB Notes Document.
- Make more extensive use of the internal ORB timer library to support ORB microbenchmarks as regression tests.
- As always, fix bugs.