Home Help Center

Ice.Default.Locator and stand-alone IceBox service

aerskineaerskine Member Allan ErskineOrganization: Credit SuisseProject: Data services
I am developing a C# IceBox service which accesses some well-known objects on our production IceGrid, and so when I am developing I set

Ice.Default.Locator=IceGrid/Locator:tcp -h gridnode1 -p 4061

in my config.servicenet file.

However, after I have set up all my servant objects for the service, and come to call

_adapter.activate()

I get an Ice.UnknownException, containing an "Ice::AdapterAlreadyActiveException" lurking within the "unknown" field.

This is thrown line 1211 of ObjectAdapterI.cs

locatorRegistry.setAdapterDirectProxy(_id, proxy);

The value of locatorRegistry is:
{IceGrid/LocatorRegistry-Master -t:tcp -h gridnode1 -p 3911}

Now -- I have a workaround for development, which is to call:

_adapter.setLocator(null);

prior to activation; but I need to comment this line out prior to deploying the IceBox service via IceGrid, since it causes problems otherwise.

Could anyone give me a hint as to what might be happening, and how I may run the same code in development and on the grid without needing to call this setLocator workaround? Many thanks!

Comments

  • benoitbenoit Rennes, FranceAdministrators, ZeroC Staff Benoit FoucherOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    Hi Allan,

    You shouldn't configure the <adapter name>.AdapterId property for this object adapter if you don't want to register it with the IceGrid registry. So removing this property from the service configuration should solve your issue.

    Cheers,
    Benoit.
  • aerskineaerskine Member Allan ErskineOrganization: Credit SuisseProject: Data services
    Oops, that was it. Thank you Benoit!
Sign In or Register to comment.