Archived

This forum has been archived. Please start a new discussion on GitHub.

Locator works slowly?

hi,
Here's a problem confused me a lot;

one application(server) is running under icegridnode,and the client use ICE Locator to request the server.At first,everything is ok,but everyTime when I restart server,the request to the server takes much times(about 20sec).I don't know why.

here's my client code,is there any problem with my code ?
compiled with vs2008,ICE3.3.1
*****************************************************************
static class AppInitial {
public static Ice.Communicator __communicator=null;

static public void initial()
{
InitializationData initData = new InitializationData();
initData.properties = Util.createProperties();
initData.properties.load("config.client");
string[] args = { "" };
__communicator = Util.initialize(ref args, initData);
}

static public ObjectPrx proxyWapper(string id)
{
ObjectPrx obj = __communicator.stringToProxy(id);
obj.ice_locator(__communicator.getDefaultLocator());
return obj;
}
}

private void button1_Click(object sender, EventArgs e)
{
SCC.BDBMgrPrx bdbMgr = SCC.BDBMgrPrxHelper.checkedCast(AppInitial.proxyWapper("SCC/BDBMgr"));//take time here ...........
this.label1.Text= bdbMgr.count().ToString();
}

here's the client.config
*******************************************************
Ice.Default.Locator=IceGrid/Locator:tcp -h 10.25.26.117 -p 12000

Could someone give a hand?:confused::confused::confused: