Servant object can't be found in IceGrid GUI.

in Help Center
hi
I deploy servant object to ice grid node in folowing style:
At client site:
And everything is OK, I can locator servant object at client site and invoke it's method, but I can't find the object at IceGrid GUI.
I deploy servant object to ice grid node in folowing style:
String prefix="SslService"; String object="sslService"; String serverId="38"; Properties props = Ice.Util.createProperties(); props.setProperty("Ice.Default.Locator", defaultLocator); props.setProperty("Ice.ImplicitContext", "PerThread"); props.setProperty("Ice.ProgramName", prefix + serverId); props.setProperty(prefix + "Adapter.ReplicaGroupId", prefix + "RepGroup"); props.setProperty(prefix + "Adapter.RegisterProcess", "0"); props.setProperty(prefix + "Adapter.AdapterId", prefix + serverId + "." + prefix + "Adapter"); props.setProperty(prefix + "Adapter.Endpoints", endPoints); InitializationData id = new InitializationData(); id.properties = props; communicator = Ice.Util.initialize(id); Ice.Identity objectIdentity = communicator.stringToIdentity(objectId); adapter.add(new SslServiceI(),objectIdentity); adapter.activate();
At client site:
Properties props = Ice.Util.createProperties(); InitializationData id = new InitializationData(); id.properties = props; props.setProperty( "Ice.Default.Locator", "OkoooGrid/Locator:default -p 4061 -h 192.168.8.36:default -p 4061 -h 192.168.8.38:default -p 4061 -h 192.168.8.41"); Communicator communicator = Ice.Util.initialize(id); String objectId = "[email protected]"; SslServicePrx sslServiceI = SslServicePrxHelper .checkedCast(communicator.stringToProxy(objectId));
And everything is OK, I can locator servant object at client site and invoke it's method, but I can't find the object at IceGrid GUI.
0
Comments
I deploy the servant object to OSGi container, so the life cycle of servant object is managed by OSGi container. So I can't use command line tool(IceGridAdmin) to deploy my applications to IceGrid. And although I can deploy servant to a Replica Group, but I don't know how to change the load balancing policy of the Replica Group.
will anybody tell me how to resolve this problem?
thanks.
That is expected. IceGrid doesn't track individual objects, that would never scale. If you want to have individual objects in the registry, then you should register a well known object. See the Ice manual, or Michi's articles on IceGrid in Connections (http://www.zeroc.com/newsletter/index.html).
I'm not sure what you mean here. Do you mean you cannot have on-demand activation of servers?
You change the load balancing policy with the load-balancing attribute of the replica-group tag. For example,
You can find more details in the Ice manual.
I mean that the servant services are self-started and self-register to IceGrid, so I don't need to use IceGridAdmin tool to deploy a XML file to IceGrid, and so I don't know how to change the load balancing policy of the Replica Group.
For well-known objects, the simplest is to use IceGrid::Admin addObject or IceGrid::Admin addObjectWithType.
Best regards,
Bernard
But now I don't think it's necessary for us to change our Java code since our service is stable, and I also now how to reslove this problem.
Thanks