The Following is from JavaTM IDL FAQ:
How do I connect to a 3rd-party Naming Service from Sun's ORB?
The recommended way is to use the
Interoperable Naming Service (INS)
, if this option is supported by the 3rd-party Naming Service.
To use the Sun ORB with another vendor's Naming Service,
- Start the 3rd-party name server on Host and Port.
Pass the following argument to ORB.init():
-ORBInitRef NameService=corbaloc:iiop:1.2@:/NameService
When you do orb.resolve_initial_references( "NameService" ), you should be able to connect to 3rd-party Name Service. If you are still not able to connect, try these troubleshooting hints:
Verify that the 3rd-party Name Service supports INS.
Verify that the host and port information is accurate.
Verify that the 3rd-party Name Service has been started successfully.
Verify that the 3rd-party Name Service supports GIOP 1.2. If not, refer to the Name Server's documentation for th开发者_运维知识库e correct the GIOP version, and modify the corbaloc: URL accordingly.
Determine if the 3rd-party Name Service has a different object key it uses to contact NameService. If so, refer to the Name Server's documentation.
I am new to CORBA and I would like to know whether or not there is another way to connect to a 3rd party Naming Service which might not be so "recommended". After all how am I to guess if, as yet unknown, 3rd party naming service supports INS (Interoperable Naming Service). But then again, I did mention that I am new to these things...
It's been more than 10 happy years since CORBA was last inflicted on me, but I still remember a few things.
The "not recommended" way is to use a IOR (Interoperable Naming Reference), which is CORBA's equivalent of a URL. The IOR is essentially a string representation of the location of a live CORBA object. A client can convert the IOR into a handle on that object.
Normally, the IOR itself points to a CoS Naming Service, which is a registry of other objects, but it's lust as valid to have an IOR that points directly at a remote object.
See this ancient article (from 1999, the last time anyone cared about CORBA) to see how to deal with IORs.
精彩评论