Archived

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

Service with multiples adapters

xdm
xdm La Coruña, Spain
Hi all

In a icebox service descriptor can i put multiples adapters, as childs of the service node?

i want one of then be a nember of a replica group and the other not. This is because i want to replicate certain objects in the service and not all.


when use multipes adapters where points current.apdater, I think this must point the adapter in where the servant that dispach the request is registered, but not sure about this. If this is correct how my servants can access the others adapters of the service? i need a extra parameter for this or Ice Run time provide a way for access then.

thanks in advance

Comments

  • benoit
    benoit Rennes, France
    Hi,

    Yes, you can specify multiple adapters in the service descriptor. The "current.adapter" attribute is set to the adapter where your servant is registered. There's no way to retrieve adapters through the communicator so your servant will need to have references on these adapters.

    An alternative to using multiple adapters would be to use a single adapter and depending on the object either create a proxy containing the replica group as the adapter id or a proxy containing the adapter id (the later is possible with the ObjectAdapter::createIndirectProxy() method).

    Cheers,
    Benoit.