Archived

This forum has been archived. Please start a new discussion on GitHub.

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,

Comments

  • dwayne
    dwayne St. John's, Newfoundland
    That sounds like a bug. We will look into it.
  • dwayne
    dwayne St. John's, Newfoundland
    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.
  • 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.
  • I agree. I'll add something to that effect to the manual.

    Cheers,

    Michi.
  • I did as you suggested. It works now. Thank you.