Jini module
DOCUMENTATION IS PROVIDED "AS IS" AND ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE DISCLAIMED, EXCEPT TO THE EXTENT THAT SUCH DISCLAIMERS ARE HELD TO BE LEGALLY INVALID.
This documentation may be out of date. Check the Forte for Java Early Access Program web site for the most recent documentation for this module.
The Jini module allows you to browse Jini services on a network.
Installation
To install the Jini module:
- Download the JiniTM System Software 1.0 Starter Kit (Jini Starter Kit) from http://www.javasoft.com/jini and install it.
- Copy the files
jini-core.jar
andjini-ext.jar
from the Starter Kit'slib
directory tojava.home
/jre/lib/ext directory
.You must use a JavaTM 2 SDK, version 1.2.2 or later for Jini to work properly.
Jini browser functionality
Context menu actions
The Jini Browser can be found on the Runtime tab in Explorer. The following functionality is available on the context menu for Jini nodes:
- Lookup - you will be prompted for the host name and port of the Jini Lookup service (default port is 4160).
- Discovery - Discovery performs a multicast lookup over the network. You can filter servers by Djinn group names.
- Refresh - Updates list of currently available services from the network.
Types of nodes
When connected to a locator service, a node will appear in the Jini browser tree for that server. Subnodes of that server are divided into four groups:
- Group - members of Djinn groups. Subnodes of groups in the Repository are any groups in the Jini Lookup Service. Group members are represented by strings.
- Entry Classes - An entry is an attribute used in Jini and is represented by an implementation of the marker interface
net.jini.core.entry.Entry
. Subnodes are all entry classes registered in the lookup service.- Service Types - type of services available on the server; also shows methods and attributes.
- Services - Jini services installed on the server. The subnodes of the services are the Entry classes and interfaces of the service. The popup menu for these nodes contains the following choices:
Starting a service
To start a Jini service, the following components must be running:
· RMI Registry or the Jini Lookup Service
Starting the Simple HTTP Server
The HTTP Server is needed for downloading classes that registries and clients will need in order to interact with services. A Simple HTTP Server can be found in the Sun Jini JAR at
/jini1_0/lib/tools.jar:
The following code might be used to start the Simple HTTP Server:
java -jar /files/jini1_0/lib/tools.jar -port 8080You can also use the Forte for Java internal HTTP Server. Simply put your files in the Repository in the Explorer. Then they will be available at the default URL
http://
your_host_name:8080/repository/
(seeProject Settings | Http Server
for internal HTTP Server settings).Starting the RMI Activation Daemon
The RMI Activation daemon is needed by the Jini Lookup service (Reggie). The activation daemon
rmid
can be found in the /bin
directory of the SDK.To start the RMI Activation daemon, simply run it from the command line by entering - e.g.:
rmid -c-Djava.rmi.server.hostname=hostname_of_localhostStarting the RMI Registry or the Jini Lookup Service
You can use either the RMI registry or the Jini Lookup service to locate services.
If you have chosen to use the RMI Registry, you can find the
rmiregistry
executable in thebin
directory of the JavaTM 2 SDK.To start the RMI Registry daemon, simply run it from the command line with no arguments:
rmiregistryIf you prefer to use the Jini Lookup service, you can invoke it with
reggie.jar
, which you find in SUN Jini package. For example, you could type the following on the command line (in Windows, all on one line; in Unix, the first three lines ending in backslashes (\)):java -jar /files/jini1_0/lib/reggie.jar http://localhost:8080/reggie-dl.jar /files/jini1_0/example/lookup/policy.all /tmp/reggie_log public