|
|
|
|||||
|
I have setup a demo VC7.1 project for IcePack studying ( under ICE 1.5.1 release) and a problem confused me.
The demo consists of three parts: a configuration file for icepackregistry, an ICE server and an ICE client. The content of config file for icepackregistry as below. Code:
IcePack.Registry.Client.Endpoints = default -p 12000 IcePack.Registry.Server.Endpoints = default IcePack.Registry.Data = db IcePack.Registry.DynamicRegistration = 1 Code:
Ice.Default.Locator = IcePack/Locator:default -p 12000 #server side MyAdapter.AdapterId = RC_Adapter MyAdapter.Endpoints = default #client side MyObject = objRC@RC_Adapter 1. start icepackregistry icepackregistry --Ice.Config=config 2. start Server Server.exe --Ice.Config=config 3. start Client Client.exe --Ice.Config=config For first time, everything works as expected. Then I shutdown icepackregistry and Server (by Ctrl+C) and re-test the demo as above. But client report error: Code:
client: .\Reference.cpp:712: Ice::NoEndpointException: no suitable endpoint available for proxy `objRC -t @ RC_Adapter' The server side code looks like this: Code:
...
Ice::ObjectAdapterPtr adapter = communicator()->createObjectAdapter("MyAdapter");
Ice::ObjectPtr object = new RemoteCallI();
adapter->add(object, Ice::stringToIdentity("objRC"));
adapter->activate();
communicator()->waitForShutdown();
...
Code:
...
Ice::ObjectPrx base = communicator()->stringToProxy(properties->getProperty("MyObject"));
if (!base){
std::cerr << "Can't create proxy!" << std::endl;
return -1;
}
RemoteCallPrx proxy = RemoteCallPrx::checkedCast(base);
if (!proxy){
std::cerr << "It's not a valid RemoteCall proxy!" << std::endl;
return -1;
}
std::cout << proxy->getTime() << std::endl;
...
Thanks.
__________________
I shall be telling this with a sigh Somewhere ages and ages hence: Two roads diverged in a wood, and I I took the one less traveled by, And that has made all the difference. --- from "The Road Not Taken" by Rober Frost Last edited by boxban : 10-15-2004 at 06:38 AM. |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| icepack registry redundancy | gminorcoles | Help Center | 3 | 07-12-2005 05:27 AM |
| Unable to register object in icepack registry | annekat | Help Center | 2 | 11-26-2004 07:01 PM |
| How to register Ice server with IcePack RegistryH | rc_hz | Help Center | 9 | 11-15-2004 08:30 AM |
| IcePack.Registry.Data and IcePack.Node.Data directories | vsonnathi | Comments | 0 | 10-21-2004 06:12 PM |
| icepack registry problems | wolfram | Help Center | 4 | 09-01-2004 09:45 AM |