Results 1 to 2 of 2

Thread: Ice::Process

  1. #1
    wrobbie is offline Registered User
    Name: Rob Kramer
    Organization: Solution Space Pte Ltd
    Project: Information display systems
    Join Date
    Apr 2005
    Location
    Singapore
    Posts
    10

    Ice::Process

    Hi,

    I have an IceGrid server application that has an event loop, so it can't do a waitForShutdown(). Because of that, the server isn't stoppable using icegridadmin; it only gets killed ungracefully after some timeout period.

    Looking through the documentation, I came accross B.57 Ice::Process, which states "Managed servers must implement this interface and invoke ObjectAdapter::setProcess to register the process proxy."

    However, ObjectAdaper has no trace of setProcess(), if this call is appropriate in the first place..

    So my question is: (how) can I be notified of imminent process shutdown by IceGrid?

    Cheers,

    Rob

  2. #2
    benoit's Avatar
    benoit is offline ZeroC Staff
    Name: Benoit Foucher
    Organization: ZeroC, Inc.
    Project: Ice
    Join Date
    Feb 2003
    Location
    Rennes, France
    Posts
    2,196
    Hi Rob,

    Sorry, the documentation is incorrect. There's indeed no such setProcess() method on the object adapter interface. We'll fix the documentation.

    You have several solutions to allow gracefull shutdown of your server:
    • Spawn a thread that calls communicator->waitForShutdown() and get this thread to gracefully shutdown your server once waitForShutdown() returns.
    • Implement your own Ice::Process interface (see src/Ice/ProcessI.cpp for example) to gracefully shutdown your server. You'll need to register a process object with the Ice locator registry. IceGrid will invoke the shutdown() method on your process object when necessary (e.g.: when you stop the server with the GUI or admin tool). See slice/Ice/Locator.ice for more information on the locator registry interface. You'll also find how to register the process object in the Ice source code (in the implementation of the activate() method in src/Ice/ObjectAdapterI.cpp).

    We'll look into improving the documentation regarding this!

    Benoit.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Does Ice Strom have to be a separate process...
    By oliverk in forum Help Center
    Replies: 1
    Last Post: 04-21-2010, 03:33 PM
  2. Ice::Process
    By marksnelling in forum Help Center
    Replies: 5
    Last Post: 11-19-2008, 09:30 AM
  3. How do I use Ice to process stream
    By hyz1840 in forum Help Center
    Replies: 3
    Last Post: 05-25-2006, 07:19 AM
  4. Forking Process within Ice Server
    By acbell in forum Help Center
    Replies: 1
    Last Post: 07-25-2005, 01:25 PM
  5. starting "ice" process (node/admin etc) via Java
    By BobDeAnna in forum Help Center
    Replies: 6
    Last Post: 01-04-2005, 09:26 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
  •