I've been looking into Dain's suggestion that the CORBA support should
be moved from Geronimo back into OpenEJB. To start this process, I've
done a survey of all of the CORBA code in Geronimo and assessed how well
it will make the move. One thing I did discover is that it will be more
difficult to untangle Yoko from the CORBA support than I had first
imagined. I think for now this should focus on just moving the current
yoko support over and thinking about getting ORB independence later.
Overall, things don't look too bad. There are a number of server
configuration items that are managed in Geronimo via GBeans that will
need equivalents within OpenEJB. I'm not familiar enough with the
OpenEJB component model yet to propose anything. The pieces that will
be needed are:
1) support to configure the ORB instances used by the server.
Configuration in this respect includes configuring the interceptors,
configuring security profiles and SSL support.
2) support to configure the NamingService instance used to publish the
locations of exported EJBs.
3) deployment support to allow EJB instances to be exported as CORBA
objects.
4) client deployment support to allow external CORBA references to get
inserted into the JNDI tree.
Those are the 4 areas where Geronimo interacts with OpenEJB and CORBA.
I imagine we'd added equivalent support to OpenEJB, and the existing
Geronimo GBeans would just wrapper the OpenEJB support.
I found one problem area in the code. A lot of the IOR security context
encoding and decoding done in Geronimo is implemented using classes in
the Geronimo crypto package. This makes it slightly more difficult to
separate from Geronimo, but this is more of an annoyance rather than a
show stopper.
Anyway, the information below can serve as a roadmap for what's in the
CORBA support and some analysis on the portability of that code.
Rick
Classes in org.apache.geronimo.corba
Adapter
AdapterDelegate
AdapterEntity
AdapterProxyFactory
AdapterStateful
AdapterStateless
AdapterWrapper
RefGenerator
Portable elements used to access EJBs through CORBA. These are
dependent upon the TSSLink elements that define the EJB-CORBA mappings
and the Geronimo EJBDeployment instance
CorbaApplicationServer
Application server context used for client RMI calls. Works in
conjunction with the RMIStubHandler in the Yoko support to intercept
outbound RMI calls to switch the context appropriately. No Geronimo
dependencies
CORBAEJBMetaData
Appears to only be used by the CorbaApplicationServer to wrapper the EJB
metadata to be used by the call context. No Geronimo Dependencies.
CORBAEJBMemento
ClientContextHolderStub
DynamicStubClassLoader
StubMethodIntercepter
These classes are probably obsolete. These were involved with
implementing the method context interceptors for the Sun ORB support.
They were orphaned when yoko was chosen as the only ORB. These classes
were never made to work with the EJB3 code, so there's likely some work
required here. The other choice is to continue supporting just Yoko for
CORBA. These are really client elements, so it might make sense to
separate the client and server ends of things.
CORBAException
General exception used for Corba problems. Used in lots of different
places. No Geronimo dependencies.
CORBAHandle
CORBAHomeHandle
CORBAHandleDelegate
Classes used for handing out remove references to EJB handles. No
Geronimo dependencies.
CORBABean
CORBABeanGBean
Used to configure an ORB instance that will be used to publish EJBs as
CORBA objects. This is highly Geronimo-specific.
CSSBean
CSSBeanGBean
Used to map client references to CORBA objectes back in to JNDI. Highly
Geronimo dependent.
TSSBean
TSSBeanGBean
Used to map EJBs that are to be exported as CORBA references. Highly
Geronimo dependent.
TSSLink
TSSLinkGBean
Used by the deployment builders to create links between TSSGBeans and
the appropriate EJB deployment. Highly Geronimo dependent.
NameService
NameServiceGBean
Geronimo GBean component for configuring the Geronimo GBean instance.
Highly Geronimo dependent.
ORBConfiguration
Interface class used to create ORB-specific configurators. Not
particularly Geronimo dependent, except for the use of TSSConfig and
SSLConfig.
ORBRef
Interface class that's not really used. This defines the getORB()
method, which is implemented by CORBABean and used by TSSBean to
retrieve the ORB instance. Not really needed any more.
StandardServant
This is the heart of the CORBA support, implementing the inbound
requests for CORBA-exported EJBs. This has a few Geronimo dependencies
that I suspect will be relatively easy to eliminate:
1. Uses org.apache.geronimo.naming.enc.EnterpriseNamingContext to the
intial context for the requestl, which includes the java:comp/ORB and
the java:comp/HandleDelegate entries.
2. Uses org.apache.geronimo.naming.java.RootContext to switch the root
context for an inbound request (uses the enterprise naming context
created above).
3. Uses org.apache.geronimo.openejb.EjbDeployment to wrapper the EJB
deployment information.
CORBAProxyReference
Proxy reference inserted into the Geronimo jndi tree by the
OpenEjbCorbaRefBuilder. Because this is part of the Geronimo naming
context, it's highly Geronimo specific.
Classes in org.geronimo.corba.security
ClientPolicy
ClientPolicyFactory
ClientSecurityInterceptor
FinalContextToken
IORSecurityInterceptor
SASConflictingEvidenceException
SASException
SASInvalidEvidenceException
SASInvalidMechanismException
SASNoContextException
SASReplyManager
ServerPolicy
ServerPolicyFactory
SSLSessionManager
SubjectManager
These classes all appear to be independent of Geronimo AND portable with
respect to the underlying ORB implementation.
SecurityInitializer
Makes use of the ORBConfigAdapter, so there's a small Geronimo
dependency here.
ServerSecurityInterceptor
Uses org.apache.geronimo.security.ContextManager to set/restore the
current context on inbound requests.
SSLConnectionListerner
SSLConnectionManager
These don't appear to be used any more. Not even sure they were used
with the Sun ORB.
Classes in org.apache.geronimo.corba.security.config
ConfigAdapter
ConfigAdapterGBean
The config adapter is a GBbean instance, and also includes references to
CORBABean and CSSBean, so this class is highly Geronimo specific.
ConfigException
ConfigUtil
Server and ORB independent helper classes.
Classes in org.apache.geronimo.corba.security.config.tss and
org.apache.geronimo.corba.security.config.css
These classes are all independent of the server and ORB environments.
Classes in org.apache.geronimo.corba.security.config.ssl
These classes define the SSL configuration an ORB instance will use for
SSL connections. These classes are highly Geronimo dependent, relying
on GBean compentry and also using the Geronimo Keystore manager services.
Classes in org.apache.geronimo.corba.transaction and
org.apache.geronimo.corba.transaction.nodistributedtransactions
No dependencies on the server or ORB environment in any of these classes.
Classes in org.apache.geronimo.corba.util
And things were going so well up to this point....there's a major
problem in this package.
Util
I'm going to cover this one first, since it presents the biggest
problem. The Util class contains several methods that encode/decode
different forms of names using in IOR context information.
Unfortunately, this process uses classes in the
org.apache.geronimo.crypto package, so this class is firmly rooted in
Geronimo. This in turn trickles back to the tss and css classes above
that looked clean at first glance. The encoding methods are used a
quite a few of those classes. I believe the usage here is fairly
simple, so it might be possible to replace the use of the crypto classes
with something less general purpose.
ClassLoading
Simple utility class for doing some common classloading operations (such
as resolving array classes). No Geronimo dependencies.
ClientContextHolderStub
DynamicStubClassLoader
DynamicStubClassLoaderGBean
I don't believe these are used any more. They're remnants of the old
Sun orb adapter code.
OpenORBUtil
OpenORBUtilGBean
UtilInitializer
I have no idea what the purpose of these classes is. I suspect they are
ancient leftovers from an attempt to integrate OpenORB into Geronimo.
StubMethodInterceptor
Use for the RMI support to perform context switching on client RMI calls.
UtilDelegateImpl
The Util delegate used to override the default RMI delegate. This is
highly OpenEJB specific rather than Geronimo specific.
Classes in the org.apache.geronimo.corba.deployment package
CorbaModuleBuilderExtension
CorbaRefBuilder
OpenEjbCorbaRefBuilder
TSSLinkBuilder
These builders all deal with managing the application deployment
descriptors and making the appropriate hook ups. The Ref builders deal
with creating the references to CORBA objects in the geronimo jndi
tree. The TSSLinkBuilder and CorbaModuleBuilderExtension take care of
making the appropriate EJB-to-ORB hookups. Something equivalent to
these will be needed for OpenEJB, and there will be some additional work
required to decide how the Geronimo version interoperates with the base
OpenEJB support.
TSSConfigEditor
CSSConfigEdtior
These are editor objects for manipulating TSSConfig and CSSConfig
elements. Is that a geronimo-only concept?
Classes in org.apache.geronimo.yoko
These classes all deal with hooking up the Yoko support to the rest of
the server. The ORBConfigAdapter class is tied up with Geronimo fairly
tightly....both by virtue of being a GBean instance, and also because it
uses references to CORBABean and CSSBean objects. Something similar
could be created for the OpenEJB framework...and the Geronimo ones could
just beome wrapppers around the OpenEJB versions. The rest of the
classes are fairly isolated from Geronimo.