Results 1 to 3 of 3

Thread: Evictor question?

  1. #1
    thelONE is offline Registered User
    Join Date
    Oct 2005
    Posts
    9

    Question Evictor question?

    I want to create a servant, pass the proxy of the servant from server to client. How to do that? the code below is my implementation, but it does not work, i don't know why!

    //
    // ICE version 2.1.2
    // server-side code
    // server creates a servant, and pass this servant's proxy to client,
    // but program blocks.
    //

    Ice::Identity fileIdentity;
    fileIdentity.category = fileCategory;
    fileIdentity.name = fileName;

    FilePrx file;

    LanE::FilePtr fileBase = new FileI();
    file = FilePrx::uncheckedCast(c.adapter->add(fileBase,fileIdentity));

    //
    // ClientCallback::sendFile(File* file) is a Slice interface method.
    // and program blocked here.
    //
    clientCallback->sendFile(file);


    By the way, I want to create a servant, and push it into an evictor list, so that it can be automatically evicted, how to do it? i have been in a puzzle about these questions for days, badly want some help! Thank you!


    thank you
    Li Delong
    Student, Beijing Jiaotong University.
    Currently working on a experimental online game project.

  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
    Sorry, I don't really understand your problem. Your code doesn't show how the proxy is returned and I'm not sure what the client code is supposed to show. Can you please post more complete code samples demonstrating your problem? As for your evictor question, in general, the servant is added to the evictor instead of the object adapter. If you're using the Freeze evictor I recommend you to take a look at the demo/Freeze/library and demo/Freeze/phonebook for examples.

    Benoit.

  3. #3
    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
    Hi Li,

    Your code looks correct. There can be several reasons for your call to block; the most common are:
    - you did not activate the adapter that hosts the clientCallback servant
    - you're out of threads in one of your processes. See http://www.zeroc.com/faq/hang.html

    Cheers,
    Bernard
    Bernard Normier
    ZeroC, Inc.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. the freeze Evictor map
    By wdp221651 in forum Help Center
    Replies: 1
    Last Post: 08-28-2008, 07:41 AM
  2. Trouble when using Evictor!
    By kent in forum Help Center
    Replies: 7
    Last Post: 04-12-2006, 09:14 PM
  3. Evictor performance question
    By xdm in forum Help Center
    Replies: 1
    Last Post: 02-23-2006, 10:06 AM
  4. Evictor problem
    By xdm in forum Help Center
    Replies: 11
    Last Post: 10-14-2003, 01:32 PM
  5. evictor question
    By xdm in forum Help Center
    Replies: 1
    Last Post: 09-14-2003, 01:11 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
  •