Java IDL is Sun's attempt at an ORB in Java, and manages to be significantly more stable than its pedigree might suggest. Many people seem to want to make it work with omniORB2, presumably because, like omniORB2, it's available gratis over the Internet. Unlike omniORB2, it doesn't come with any source code, but it's better than nothing.
For the most part, Java IDL and omniORB2 work quite happily together, as they ought to, given that that's the whole point of CORBA. There are a couple of problems, though:
The CosNaming stubs supplied with Java IDL are built from IDL with a '#pragma
prefix "omg.org"
' at the top, whereas omniNames' Naming.idl
,
for reasons I've not enquired about, doesn't have this. Thus, to make Java IDL work with
omniNames, it's necessary to make some new stubs from the omniNames Naming.idl
.
In order to get the stubs in the right Java package, it's necessary to put '#pragma
javaPackage "org.omg"
' at the top of the file.
resolve_initial_references
to find an
omniNames server. Eventually, after a bit of poking around, I found that this works: # java com.sun.CosNaming.BootstrapServer -InitialServicesFile filename
where filename is the name of a file each of whose lines defines an initial
service, with a name and a stringified IOR separated by spaces. This can be generated from
an omniORB.cfg
file using:
$ sed -n 's/NAMESERVICE /NameService /p' < omniORB.cfg > filename
If you're not root, or you trust Java about as far as you can throw it, you may want to
add -ORBInitialPort n
, where n is a convenient
non-privileged port number. You'll have to use the same argument to all your other JavaIDL
programs on the same machine.