New to Java? We'll help you get started with our revised beginner's tutorial, or our free online textbook.

Get the latest Java books
h t t p : / /w w w . j a v a c o f f e e b r e a k . c o m /

Java Coffee Break

Jan Newmarch's Guide to JINI Technologies

Jan Newmarch

Version 2.04

13 Feb 2000

0.1. Contents

This version uses Jini 1.1 (alpha). For a version using Jini 1.0, see

0.1.1 Chapters

  1. Overview (Last modified: version 2.02)
    1. Jini
    2. Components
    3. Service Registration
    4. Client Lookup
    5. Proxies
    6. Client Structure
    7. Server Structure
    8. Partitioning an Application
    9. Support Services
    10. Summary
  2. TroubleShooting Jini (Last modified: version 2.02)
    1. The Chapter that Shouldn't Exist
    2. Java Packages
    3. Jini Versions
    4. Jini Packages
    5. Lookup Service
    6. RMI Stubs
    7. Debugging
  3. Discovering a Lookup Service (Last modified: version 2.02)
    1. Lookup Service
    2. Unicast discovery
    3. Broadcast discovery
    4. ServiceRegistrar
    5. Summary
  4. Entry Objects (Last modified: version 2.02)
    1. Entry class
    2. Restrictions on entries
    3. Convenience Classes
    4. Further Uses of Entries
    5. Summary
  5. Service Registration (Last modified: version 2.02)
    1. ServiceRegistrar
    2. ServiceItem
    3. Registration
    4. ServiceRegistration
    5. Entries
    6. Summary
  6. Client Search (Last modified: version 0.04)
    1. ServiceRegistrar
    2. ServiceMatches
    3. Matching
    4. Summary
  7. Leasing (Last modified: version 2.02)
    1. Leases
    2. LeaseRenewalManager
    3. Granting and handling leases
    4. Summary
    5. Summary
  8. Simple Example (Last modified: version 2.02)
    1. Problem Description
    2. Service Specification
    3. Common Classes
    4. Client
    5. Service Proxy
    6. Uploading a Complete Service
    7. Summary
  9. Choices for Service Architecture (Last modified: version 2.02)
    1. Proxy Choices
    2. RMI Proxy for FileClassifier
    3. Non-RMI Proxy for FileClassifier
    4. RMI and non-RMI Proxies for FileClassifier
    5. Using the Naming service
    6. Using Other Services
  10. Discovery Management (Last modified: version 2.02)
    1. Management Interfaces
    2. LookupLocatorDiscovery
    3. LookupDiscoveryManager
    4. Conclusion
  11. Join Manager (Last modified: version 2.02)
    1. Join Manager
    2. Jini 1.0 JoinManager
    3. Summary
  12. Security (Last modified: version 2.03)
    1. Quick Fix
    2. Why AllPermission is Bad
    3. Removing AllPermission
    4. Jini with Protection
    5. Service Requirements
    6. Client Requirements
    7. ServiceRegistrar
    8. Transaction Manager and other Activatable Services
    9. rmid
    10. Being Paranoic
  13. More Complex Examples (Last modified: version 2.02)
    1. Where is the Code
    2. Running threads from discovery
    3. Inexact Service Matching
    4. Matching using Local Services
    5. Finding a Service Once Only
    6. Leased Changes to a Service
  14. Remote Events (Last modified: version 2.02)
    1. Event Models
    2. Remote Events
    3. Event Registration
    4. Listener List
    5. Listener Source
    6. File Classifier with Events
    7. Monitoring Changes in Services
    8. Summary
  15. ClientLookupManager (Last modified: version 2.02)
    1. Introduction
    2. ServiceItemFilter
    3. Finding a Service Immediately
    4. Using a Filter
    5. Building a Cache of Services
    6. Monitoring Changes to the Cache
    7. Summary
  16. Transactions (Last modified: version 0.11)
    1. Introduction
    2. Transactions
    3. TransactionManager
    4. TransactionParticipant
    5. Mahalo
    6. Example
    7. Summary
  17. Lego MindStorms (Last modified: version 2.02)
    1. Making Hardware into Jini Services
    2. MindStorms
    3. MindStorms as a Jini Service
    4. RCXPort
    5. RCX Programs
    6. Jini classes
    7. Getting it running
    8. Entry objects for a robot
    9. A client-side RCX class
    10. Higher level mechanisms: Not Quite C
    11. Summary
  18. CORBA and Jini (Last modified: version 0.12)
    1. CORBA
    2. CORBA to Java Mapping
    3. Jini Proxies
    4. Simple Example
    5. Room Booking Example
    6. Migrating a CORBA Client to Jini
    7. Jini Service as a CORBA Object
    8. Summary
  19. User Interfaces for Jini Services (Last modified: version 2.03)
    1. User Interfaces as Entries
    2. User Interfaces from Factory Objects
    3. Current Factories
    4. Marshalling Factories
    5. File Classifier Example
    6. Objects Returned from getUI()
    7. Support Classes
    8. Images
    9. MindStorms
    10. Summary
  20. Activation (Last modified: version 2.02)
    1. Introduction
    2. A Service using Activation
    3. LeaseRenewalService
    4. LookupDiscoveryService
    5. Summary
  21. Architecture (Last modified: version 2.02)
    1. Threads

0.1.2 Appendices

  1. Properties used in Jini

0.2. Files

The source to the programs is available as a zip file The compiled classes are available as a zip file

The documentation files are also available as a zip file This includes HTML versions of the files. I am using XML as document format, using a mishmash of the DocBook DTD with extra tags and HTML thrown in. A Perl program,, is a handler called by my Apache Web server to deliver XML files as HTML.

Postscript versions of the documentation files are in These are generated using html2ps, and I know this produces Postscript that does not print on all printers - in particular, our Kyocera printers. If you have problems printing these, let me know the solution only. Please note that the copyright license allows you to make single printed copies for your own use, but not multiple printed copies.

0.3. Update Information

This tutorial will be updated on a regular basis, maybe several times a week. If you want to receive an email announcement of each version release, send email to with subject ``Jini tutorial update''

0.4. Feedback

I would appreciate any feedback on this tutorial, to ensure that it is correct and meets the needs of readers. The feedback that I have already received has been very valuable. Please send comments/corrections/requests, etc, to

0.5. Other Resources

  1. The Jini FAQ at
  2. Jini Community Web Site
  3. Noel Enete's ``Nuggets'' tutorial at
  4. Eran Davidov's timeservice example at
  5. Roger Whitney's lecture notes on ``Java Distributed Computing'' at
  6. Benot Marchal's articles for Digital Cat's Java Resource Center at (and Jini2.html, Jini3.html, etc)
  7. Jini Home page
  8. RMI Home page
  9. Jini mailing list
  10. Jini mailing list archives
  11. RMI mailing list
  12. RMI mailing list archives
  13. Jini Interface Repository for standardised service interfaces (empty at present)

0.6. Changes

See the file Changes for the list of version releases and changes made between versions.

0.7. Copyright Information

This tutorial (and the pages it contains) are covered by the OpenContent license. This basically gives you freedom to do what you want with the document in a similar way to the GNU license for software. Any changes or additions that you make to this set of pages as a Web document must be made publically available, and may be folded into later versions of this tutorial. Any such inclusions will of course be credited with your copyright, under the OpenContent license.

On the other hand, the programs that this tutorial references are also available unbundled from the tutorial, and do not have the restriction that source derived from them must be made publically available. So you can derive your own source code from them, without having to make it public. I'm not sure what suitable license will do this...

And, of course, there is no warranty...

0.8. Acknowledgements

The author is grateful for comments on this tutorial from

  1. Brian Jeltema,
  2. Roger Whitney,
  3. Robbert van den Beld,
  4. Chitrarasu Muthaiyan,
  5. Stuart Remphrey, Stuart.Remphrey@Aus.Sun.COM
  6. JJ Larrea,
  7. John McClain, John.McClain@East.Sun.COM
  8. Bob Scheifler,

The author is currently on a sabbatical program at the CRC for Distributed Systems Technology, and the work reported in this tutorial has been funded in part by the Co-operative Research Centre Program through the Department of Industry, Science and Tourism of the Commonwealth Government of Australia.

This file is Copyright (©) 1999, 2000 by Jan Newmarch (
This material may be distributed only subject to the terms and conditions set forth in the Open Publication License, v0.4 or later (the latest version is presently available at Distribution of the work or derivative of the work in any standard (paper) book form is prohibited unless prior permission is obtained from the copyright holder.

Back to main

Copyright 1998, 1999, 2000 David Reilly

Privacy | Legal | Linking | Advertise!

Last updated: Monday, June 05, 2006