[omniORB] Changing endPoint with options of ORB_init

Thomas Baron thomas.baron at dassault-aviation.fr
Fri Mar 12 11:45:25 GMT 2004


Hi !

I'm trying to start a CORBA server on a given port, finding dynamically
a free TCP port to use.
I'm using the parameter of ORB_init(), as described in section 4.1.2 of
the manual.

When the ORB_init fails, I destroy the ORB (even sleep()ing for a few
seconds after the call) and I try another port (incrementing port
number) with the option 'endPoint' in the parameter 'const char
*options[][2]'
But the next ORB_init still fails, with an error message saying it can
bind to the port number I specified first.

When I free the first TCP port I specified (I stopped the server running
on it), then the ORB_init succeed, but listening not on only one port,
but on all ports I tried (by passing them one after another in the
parameter of ORB_init). Resulting server have a very very long IOR, to
specify each endpoints.

Looking in the code of omniOrbORB::destroy (in
src/lib/omniORB/orbcore/corbaORB.cc), I found that a call is made to
omni_orbOptions_initialiser_attach(). Is it intended that's not a
detach(), like almost every call here ?

Thanks,

Tom




More information about the omniORB-list mailing list