Adapter.waitForDeactivate() Followed By Activate()

loheronloheron Member Larry OHeronOrganization: LLE/UofRProject: distributed apps
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

  • dwaynedwayne St. John's, NewfoundlandMember Dwayne BooneOrganization: ZeroC, Inc.Project: Internet Communications Engine
    That sounds like a bug. We will look into it.
  • dwaynedwayne St. John's, NewfoundlandMember Dwayne BooneOrganization: ZeroC, Inc.Project: Internet Communications Engine
    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.
  • loheronloheron Member Larry OHeronOrganization: LLE/UofRProject: distributed apps
    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.
  • michimichi Member Michi HenningOrganization: Triodia TechnologiesProject: I have a passing interest in Ice :-) ✭✭✭
    I agree. I'll add something to that effect to the manual.

    Cheers,

    Michi.
  • loheronloheron Member Larry OHeronOrganization: LLE/UofRProject: distributed apps
    I did as you suggested. It works now. Thank you.
Sign In or Register to comment.