Results 1 to 6 of 6

Thread: Servant object can't be found in IceGrid GUI.

  1. #1
    Jiangyubao is offline Registered User
    Name: Yubao Jiang
    Organization: www.gliet.edu.cn
    Project: integrate OSGi & Ice to provice service for PHP
    Join Date
    Oct 2007
    Location
    Beijing China
    Posts
    62

    Servant object can't be found in IceGrid GUI.

    hi
    I deploy servant object to ice grid node in folowing style:
    Code:
    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:
    Code:
    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 = "sslService@SslServiceRepGroup";
    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.
    Attached Images Attached Images
    Last edited by Jiangyubao; 10-29-2008 at 04:14 AM.

  2. #2
    Jiangyubao is offline Registered User
    Name: Yubao Jiang
    Organization: www.gliet.edu.cn
    Project: integrate OSGi & Ice to provice service for PHP
    Join Date
    Oct 2007
    Location
    Beijing China
    Posts
    62
    And there is another problems:

    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.

  3. #3
    matthew's Avatar
    matthew is offline ZeroC Staff
    Name: Matthew Newhook
    Organization: ZeroC, Inc.
    Project: Internet Communications Engine
    Join Date
    Feb 2003
    Location
    NL, Canada
    Posts
    1,458
    Quote Originally Posted by Jiangyubao View Post
    ...
    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.
    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 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.
    I'm not sure what you mean here. Do you mean you cannot have on-demand activation of servers?

    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.
    You change the load balancing policy with the load-balancing attribute of the replica-group tag. For example,

    Code:
    <replica-group id="EncoderAdapters"> 
    <load-balancingtype="adaptive"/>
    You can find more details in the Ice manual.

  4. #4
    Jiangyubao is offline Registered User
    Name: Yubao Jiang
    Organization: www.gliet.edu.cn
    Project: integrate OSGi & Ice to provice service for PHP
    Join Date
    Oct 2007
    Location
    Beijing China
    Posts
    62
    Thanks a lot for your reply.
    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.

    I'm not sure what you mean here. Do you mean you cannot have on-demand activation of servers?
    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.

  5. #5
    bernard's Avatar
    bernard is offline ZeroC Staff
    Name: Bernard Normier
    Organization: ZeroC, Inc.
    Project: Ice
    Join Date
    Feb 2003
    Location
    Palm Beach Gardens, FL
    Posts
    1,294
    You can register your servers and well-known objects programmatically: you don't need to use XML files.

    For well-known objects, the simplest is to use IceGrid::Admin addObject or IceGrid::Admin addObjectWithType.

    Best regards,
    Bernard
    Bernard Normier
    ZeroC, Inc.

  6. #6
    Jiangyubao is offline Registered User
    Name: Yubao Jiang
    Organization: www.gliet.edu.cn
    Project: integrate OSGi & Ice to provice service for PHP
    Join Date
    Oct 2007
    Location
    Beijing China
    Posts
    62
    Thanks for your reply!

    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

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. no object found in IcePHP_defineStruct()
    By anomaly in forum Help Center
    Replies: 2
    Last Post: 01-06-2011, 02:05 PM
  2. Launching GUI apps with IceGrid
    By jharriot in forum Help Center
    Replies: 2
    Last Post: 06-21-2008, 08:34 AM
  3. Replies: 2
    Last Post: 06-23-2007, 07:19 AM
  4. noob using icegrid-gui
    By timberwolf in forum Help Center
    Replies: 5
    Last Post: 02-07-2007, 05:58 AM
  5. Pluggable IceGrid GUI?
    By timp in forum Help Center
    Replies: 5
    Last Post: 01-20-2006, 09:55 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •