Results 1 to 6 of 6

Thread: Adapter.waitForDeactivate() Followed By Activate()

  1. #1
    loheron is offline Registered User
    Name: Larry OHeron
    Organization: LLE/UofR
    Project: distributed apps
    Join Date
    Nov 2006
    Posts
    24

    Adapter.waitForDeactivate() Followed By Activate()

    I searched all the forums and only found one non-relevant reference. I've also gone thru the 3.3 manual, and did not notice any deviations from 3.1

    Under 3.1 (with appropriate real-world time delays), the following code executed successfully, so that the user interface could connect/disconnect multiple times:
    adapter = ic.createObjectAdapter( serverName )
    adapter.activate()
    adapter.add(servantProxy, iceId)
    adapter.deactivate()
    adapter.waitForDeactivate()
    adapter.activate()
    adapter.add(servantProxy, iceId)

    Under 3.3, the same sequence generates an ObjectAdapterDeactivatedException on the second call to adapter.activate() and adapter.add ( ... ). As a result, the servant does not work.

    Pls advise of any changes needed from 3.1 to 3.3. (C# w/VS2005 on XP PC).

    Thank you,
    Last edited by loheron; 10-30-2008 at 01:43 PM.
    Lawrence O'Heron
    Univ of Rochester/Laboratory for Laser Energetics
    250 E. River Rd.
    Rochester NY 14612
    www.lle.rochester.edu

  2. #2
    dwayne's Avatar
    dwayne is offline ZeroC Staff
    Name: Dwayne Boone
    Organization: ZeroC, Inc.
    Project: Internet Communications Engine
    Join Date
    Jan 2005
    Location
    St. John's, Newfoundland
    Posts
    397
    That sounds like a bug. We will look into it.

  3. #3
    dwayne's Avatar
    dwayne is offline ZeroC Staff
    Name: Dwayne Boone
    Organization: ZeroC, Inc.
    Project: Internet Communications Engine
    Join Date
    Jan 2005
    Location
    St. John's, Newfoundland
    Posts
    397
    Actually this is not a bug, but the expected behavior. From the ObjectAdpater slice refererence in the manual

    "Object adapters that have been deactivated must not be reactivated again, and cannot be used otherwise. Attempts to use a deactivated object adapter raise ObjectAdapterDeactivatedException; however, attempts to deactivate an already deactivated object adapter are ignored and do nothing."

    After deactivation it is possible to destroy the adapter to clean up resources and then create and activate a new adapter with the same name.

  4. #4
    loheron is offline Registered User
    Name: Larry OHeron
    Organization: LLE/UofR
    Project: distributed apps
    Join Date
    Nov 2006
    Posts
    24
    Got it. Will proceed with destroying the adapter and then creating it again.

    I would strongly suggest that that advice be part of the manual.
    Lawrence O'Heron
    Univ of Rochester/Laboratory for Laser Energetics
    250 E. River Rd.
    Rochester NY 14612
    www.lle.rochester.edu

  5. #5
    michi's Avatar
    michi is offline Registered User
    Name: Michi Henning
    Organization: Triodia Technologies
    Project: I have a passing interest in Ice :-)
    Join Date
    Feb 2003
    Location
    Brisbane, Australia
    Posts
    1,055
    I agree. I'll add something to that effect to the manual.

    Cheers,

    Michi.

  6. #6
    loheron is offline Registered User
    Name: Larry OHeron
    Organization: LLE/UofR
    Project: distributed apps
    Join Date
    Nov 2006
    Posts
    24
    I did as you suggested. It works now. Thank you.
    Lawrence O'Heron
    Univ of Rochester/Laboratory for Laser Energetics
    250 E. River Rd.
    Rochester NY 14612
    www.lle.rochester.edu

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. object registration with activate()
    By n2503v in forum Help Center
    Replies: 3
    Last Post: 03-13-2010, 03:42 AM
  2. IceGrid Activate Timeout
    By zaoliu in forum Help Center
    Replies: 4
    Last Post: 03-10-2008, 07:08 PM
  3. Hang in activate() on Linux
    By walls1500 in forum Help Center
    Replies: 8
    Last Post: 03-01-2007, 11:59 AM
  4. one adapter or many
    By shimrod in forum Help Center
    Replies: 2
    Last Post: 11-07-2005, 06:56 AM
  5. waitForDeactivate hang amidst batch request
    By gsalazar in forum Help Center
    Replies: 7
    Last Post: 01-20-2005, 12:09 PM

Posting Permissions

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