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,
with CORBA 3.0 extensions 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.
Building the Project
The simplest thing to do is to use NetBeans:
- Set the CVSROOT to :pserver:<yourname>@cvs.dev.java.net:/cvs. You must have a java.net account to do this.
- Everything is in the glassfish-corba module, so checkout the entire module (about 6400 files).
- NetBeans should automatically recognize the project, so just open the project.
- Use NetBeans to build and run tests as desired.
More details (and other options) are described here
(pdf) in the ORB documentation.
Obtaining ORB builds
All of the ORB files are contained in the GlassFish appserv-rt.jar
file. You can get this from GlassFish. We also maintain copies of the
ORB builds in the maven repostitory (TBD).
Planned Work
There are a number of efforts underway right now to improve the ORB:
- Replace the current ORB monitoring framework with JMX, and expand its coverage.
The intent here is to make it easy to add monitoring to any interesting state in the
ORB, and make the monitored data available to any standard MBean client like jconsole.
We will also work to get the additional data integrated with the app server's administration
GUI.
- Improve the transport and low-level encoding performance. This includes fixing some
problems with reading and writing non-blocking SocketChannels, as well as some issues with
how the ORB uses direct ByteBuffers.
- 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.
Note that the most current version of codegen is not yet in this project. The
current documentation is limited to the javadocs (see the
com.sun.corba.se.spi.codegen.Wrapper class in the optional branch of the project).
Here are some additional items that we plan to work on (some will only take a few days,
some may take several months):
- Integrate CheckStyle into the project and fix style problems.
- Integrate FindBugs and fix any issues it finds.
- Replace the current rmic -iiop backend with code that takes advantage
of the dynamic RMI-IIOP implementation and the codegen library.
- 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.
- Move the makefile-based rename to ant.
- Develop a secure bootstrap protocol to supplement the Interoperable Name Service.
- Make more extensive use of the internal ORB timer library (take a look at the
com.sun.corba.se.spi.orbutil.newtimer package in the main branch) to support ORB
microbenchmarks as regression tests.
- Support Java 5 enums in RMI-IIOP.
- Explore how we can speed up marshalling of complex data types.
- As always, fix bugs.