Archived

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

IceBox Determining Dependent Services

Hello,

I am deploying my Ice services (service1, service2, service3) within IceBox.

I would like to determine within my implementation objects (extending from Ice.ObjectImpl) to determine the dependency of services within each other.

Eg. When Service2 is being started ( callback start() ) it should ensure that service1 is already started and that when service3 is started it should detect that the services 1 and 2 are started.

I understand that IceBox.LoadOrder will ensure that for me, however I would like to determine that programatically.

Also, within each service I can keep a list of dependent services within endpoint and get ObjectPrx by doing stringToProxy() and then ice_ping(). However, for doing so I would have to pass end points aswell. I do not wish to do so. I just want to check in service2 if the service1 is previously loaded.

Your help in this matter is appreciated.

Thanks

Comments

  • mes
    mes California
    Hi,

    If your services all used the shared communicator, they could each set a property to indicate that they have been loaded, and those properties could be checked by the other services.

    If each service has its own communicator, you'll need to use an application-specific mechanism to verify that the services have been loaded. For example, you could use a singleton object that tracks the installed services.

    Hope that helps,
    - Mark
  • Thank you for your prompt reply and appreciate your suggestions.

    I am currently using shared communicator
    IceBox.UseSharedCommunicator.ServiceManager=1

    Setting up a property at the service level and checking for the same is what I had incorporated. I was looking for a sleeker solution :)

    Thanks for the help.

    Regards