[omniORB] Working on CosTransactions, but need help

Scott Robertson srobertson@codeit.com
Wed Feb 12 23:11:01 2003


Duncan! Thanks for the help, I've got a few more questions if you don't
mind.

....
> 
> > 1.) I can't compile the CosTransactions.idl because the Current
> > interface extends CORBA::Current, which is not defined anywhere in any
> > of the IDLs that come with omniOrb as far as I can see. Looking at some
> > other ORBs, implementations they seem to just define Current with no
> > attributes or methods.
> 
> The problem is that Current is not a normal CORBA interface -- it's a
> pseudo interface. The implementation of the CosTransactions::Current
> interface couldn't be done using the normal CORBA mapping, so it's no
> great loss to not be able to compile it with omniidl. You should
> #ifdef it out of CosTransactions.idl, and just implement the class in
> a way that follows the C++ mapping. The same is done with
> PortableServer::Current.

I'm not sure which class my transaction Current should inherit from. Is
omniCurrent meant to be used for implementing other Currents or is it
specific to PortableServer? PortableServer::Current is a a bit confusing
to look at with all the inheritance going on. 

> 
> > 2.) What's the best way to add the intrecetpors? Right now I just do the
> > add  right after calling ORB.init()... This is rather combersome is
> > there someway to get omni orb to load this dynamically for me?
> 
> Yes. Look at include/omniORB4/internal/initialiser.h. Create an
> initialiser then register it using the install static function. The
> initialiser's attach() method will then be called during ORB_init(),
> at which time it can install its interceptors.

I got that part, but is there away to compile all my code into a shared
library and then have a stock version of omniOrb find it, call some sort
of init method where I can then register the initaliser? 


Thanks for the help!




-- 
Scott Robertson <srobertson@codeit.com>