|
Summary: Defining group names and unicast Locators for Jini Services; searching for available lookup services in the network.
Essential Guidelines
In such a case, make sure you have a different lookup group for each space, where each space is configured to use a specific lookup. A good practice is to have different space/service names. Setting up the Lookup Service GroupEach of the Jini Services (such as the Reggie lookup service or the Mahalo Transaction Manager) registers and advertises using a group name which is defined by the following system property (set in the /bin/setenv.bat file): set LOOKUPGROUPS="gigaspaces-%USERNAME%" set LOOKUP_GROUPS_PROP=-Dcom.gs.jini_lus.groups=%LOOKUPGROUPS% While the %USERNAME% will be replaced after installation with the version number e.g. The command that loads a space needs to have this system property set. Another way of doing it instead of setting the com.gs.jini_lus.groups system property, is to set the Space URL groups attribute, e.g.: /./mySpace?schema=cache&groups=myPrivateGroupName How do I Use/Set Unicast (Jini Locators) Discovery?There are many cases when you need to use a unicast-based services discovery, for example if you want to use unicast with multicast (using Jini Groups) or when you do not have multicast enabled on your machine, or you prefer not to use multicast.
What Should I Change in Order That Services will be Found Using Jini Unicast Protocol?In order that the services (spaces, GSC, GSM, processing units etc.) will be found using Jini Unicast protocol, you will need to do the following:
if "%LOOKUPLOCATORS%" == "" ( set LOOKUPLOCATORS=linux-lab1:4160,linux-lab2:4160 ) set LOOKUP_LOCATORS_PROP=-Dcom.gs.jini_lus.locators=%LOOKUPLOCATORS% In the example above, the GSM/LUS should run on linux-lab1:4160 and linux-lab2:4160 machines. What should I Change in Order to Find a Service Using Jini Unicast Protocol?Once the services (spaces, GSC, GSM, processing units etc.) already started with the -Dcom.gs.jini_lus.locators settings then any client should be able to find it using unicast discovery. Do the following in order to "tell" the client to lookup a service using a unicast protocol:
E.g. for unicast AND multicast discovery jini://*/./mySpace?locators=linux-lab1:4160,linux-lab2:4160&groups=gigaspaces-6.0XAP
jini://linux-lab1:4160,linux-lab2:4160/./mySpace?locators=linux-lab1:4160,linux-lab2:4160
Changing Jini Lookup Service (or Mahalo) Unicast Port
Troubleshooting the Discovery/Group ConfigurationUsing the list LUS CLI option, run from <GigaSpaces Root>\bin\gs.bat/sh, you can search for available Jini Lookup Services in the network. Since GS 6.0.2: The following result examples appear on the console: -----------------------------------------------------------------------
-- Discovered Lookup Service at host [ 192.168.10.233 ].
-- Lookup Service registered to the following jini groups:
Group [ gigaspaces-gershon ]
-- Lookup Service has [3] services, lookup took [631] millis, [0] seconds:
Service Class: com.j_spaces.core.JSpaceContainerProxy | 018aae08-5d2a-4b61-9739-36c915f4e2d9
Service Class: com.j_spaces.core.client.JSpaceProxy | 6f05db92-187f-4e26-b52d-ec32d3d4723c
Service Class: com.sun.jini.reggie.ConstrainableRegistrarProxy | 2ff6aab3-8e1a-4a2b-a1b2-
4391825c2bbc
-----------------------------------------------------------------------
-- Discovered Lookup Service at host [ 192.168.10.233 ].
-- Lookup Service registered to the following jini groups:
Group [ gigaspaces-gershon ]
-- Lookup Service has [3] services, lookup took [50] millis, [0] seconds:
Service Class: com.j_spaces.core.JSpaceContainerProxy | 018aae08-5d2a-4b61-9739-36c915f4e2d9
Service Class: com.j_spaces.core.client.JSpaceProxy | 6f05db92-187f-4e26-b52d-ec32d3d4723c
Service Class: com.sun.jini.reggie.ConstrainableRegistrarProxy | d3e7e224-9b46-4782-a902-
e4e64c11ca95
Multi Network Card ConfigurationThe configs/services/services.config contain a specific setup for Multi-NIC interfaces (as part of the net.jini.discovery.LookupDiscovery and Reggie/Mahalo blocks).
|
(works on Firefox 2 and Internet Explorer 7)
For more details, see