Hi,
There's no way to get this information directly. You can however create a proxy with the adapter and get the port number from the stringified proxy, for example:
Code:
// C++
Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapterWithEndpoints("MyAdapter", "tcp");
cout << adapter->createProxy(communicator->stringToIdentity("Dummy"))->ice_toString() << endl;
You can also enable network tracing with --Ice.Trace.Network=1 to see on which port the object adapter is listening.
Cheers,
Benoit.