Go Back   ZeroC Forums > Help Center

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
  #1 (permalink)  
Old 10-15-2004
boxban boxban is offline
Registered User
 
 
Join Date: Aug 2004
Location: Shanghai.China
Posts: 1
Question Problem with IcePack.Registry

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
The content of config file for Client & Server as below:
Code:

Ice.Default.Locator = IcePack/Locator:default -p 12000

#server side
MyAdapter.AdapterId = RC_Adapter
MyAdapter.Endpoints = default

#client side
MyObject = objRC@RC_Adapter
I test my demo in 3 steps:
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'
I shutdown icepackregistry and Server, remove all files (generated by icepackregistry) in folder `db' (which specified with IcePack.Registry.Data), and re-test my demo, it works!

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();
	...
The client side code looks like this:
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;
	...
Can anybody tell me why and how to fix the problem?
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.
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

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


All times are GMT -4. The time now is 05:32 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0
(c) 2008 ZeroC, Inc.