dev@glassfish.java.net

Re: Felix 2.0.0 integrated

From: Ken Cavanaugh <Ken.Cavanaugh_at_Sun.COM>
Date: Fri, 11 Sep 2009 17:10:22 -0700
Lloyd Chambers wrote:
How does this involve the ORB?

First off, everything in the com.sun.corba.ee package is part of the ORB in GlassFish, so the ORB code is
involved here.

The reason for all of this comes down to one simple fact: Class.forName does not work very well under
OSGi.  Lots of things in the ORB are configured by class name, plus there is the fundamental problem of
unmarshaling a value type: when you receive a request containing a reference to the name of a class,
how do you find the correct instance of the class?  This used to be easy: just use the RMI ClassLoader, which
most often was simply the ClassPath class loader.  Now we need a way to determine which bundles contain
particular classes or packages for these sorts of questions.

Consequently, I added the OSGIListener to the ORB, which listens for bundle start and stop events and scans
the bundles already registered for two things:
Ken.