I think the answer might actually be yes for both multicast and unicast cases. I'm sure about unicast, but my memory is more fuzzy about multicast.
The scenario I've specifically tested is a LUS on 4160 for one djinn and another LUS on 4161 for a special-purpose djinn. I'm sure that it works if you have unicast locators for the 4160 and 4161 ports, but I can't recall if multicast found both LUS instances. In principle I think it should work because the LUS' multicast announcement contains the locator back to 4160 or 4161. Note that Reggie *can* support multiple groups with a single instance! In particular, I've done this with a client-side filter to remove the lookup results that match the wrong group. I needed that for cases where clients have an out-of-date unicast locator pointing to a LUS that's now serving an unrelated djinn. Chris -----Original Message----- From: Sergio Aguilera Cazorla [mailto:[email protected]] Sent: Tuesday, April 17, 2012 5:12 AM To: [email protected] Subject: Several Lookup Servers on same Host Hello everybody, I suspect the answer for my main question is "no", but I would like to confirm with you before discarding the idea. I have been developing an application that uses Jini / Apache River architecture, and now it's time for deployment. I would like to run several Lookup Services on the same machine so clients could see them as "separate" servers. In fact, each one of the LUS is attached to a different discovery group, and my programs sets the differences among discovered services based on the group which they belong to. If I try this on separate physical hosts, my program works OK. However, I would like to run all the Lookup Servers on the same host. In the default Sun implementation, when the first LUS is fired, it is assigned an address like "jini://myHost:4160", so you can discover it by performing multicast on the default port 4160. As you fire more LUS, they are assigned different and random ports, so discovery in that way does not work... So, my questions are: *1 *- Is there a way to launch more than one LUS in the same host, both working under the default jini port 4160? --> I suspect "no"... *2 *- If not, is there a way (from the client side) to perform multicast discovery and get a response from ALL Lookup Servers, despite the port they are attached to? Take into account that clients don't know anything about random ports assigned by the 2nd, 3rd... execution af Reggie. At this moment, I am performing discovery via the LookupDiscovery class. *3 *- Am I misunderstanding something about ports? I mean, am I mixing concepts about multicast discovery / unicast response ports? Thank you very much! -- *Sergio Aguilera*
