Archived
This forum has been archived. Please start a new discussion on GitHub.
How to know what default things are?
Pompei2
in Help Center
Hello,
Is it somehow possible to see, during runtime, what the "default" stuff (for example: protocol and host) of a communicator are?
I searched a lot and the most obvious way:
I noticed that all properties are gone from the communicator. Listing the whole property set gives me just the following:
I feel I could create a dummy proxy then convert it to a string and parse that string, but this is a gigantic hack and requires the proxy to connect successfully!
Is there really no way?
PS: My application inherits from Ice::Application
Is it somehow possible to see, during runtime, what the "default" stuff (for example: protocol and host) of a communicator are?
I searched a lot and the most obvious way:
communicator()->getProperties()->getProperty("Ice.Default.Protocol");
does not work, too bad!I noticed that all properties are gone from the communicator. Listing the whole property set gives me just the following:
Ice.Config= Ice.ProgramName=./clientThat is not much information at all!
I feel I could create a dummy proxy then convert it to a string and parse that string, but this is a gigantic hack and requires the proxy to connect successfully!
Is there really no way?
PS: My application inherits from Ice::Application
0
Comments
-
Michi, it still looks like there are some values with the logic:
if ""==properties.getProperty("Ice.Default.Protocol",""): useDefault()rather than having those defaults assigned to the properties instance on initialization:$ python Python 2.5.4 (r254:67916, Jun 24 2009, 20:23:29) [GCC 4.0.1 (Apple Computer, Inc. build 5370)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import Ice ic = I>>> ic = Ice.initialize() >>> m = ic.getProperties().getPropertiesForPrefix("") >>> m {'Ice.Default.CollocationOptimized': '0', 'Ice.Config': ''} >>>
~J.0 -
By doing this, I noticed that nearly all properties of the communicator are gone after the initialization (I'm sure they are set before!). That's what I meant by this:Pompei2 wrote: »I noticed that all properties are gone from the communicator. Listing the whole property set gives me just the following:
Ice.Config= Ice.ProgramName=./client
within the run() method of my overwritten service class, all the properties I give to main() (by command line or programmatically) are gone.0

