]> Jan Newmarch's Guide to JINI Technologies Jan Newmarch 2.06 20 Aug 2000
http://jan.newmarch.name/java/jini/tutorial/Jini.xml
This tutorial is now available as a book from APress and Amazon
Contents This version uses Jini 1.1 (beta). For a version using Jini 1.0, see http://jan.newmarch.name/java/jini/tutorial.1.03/Jini.xml Chapters Overview version 2.02 Jini Components Service Registration Client Lookup Proxies Client Structure Server Structure Partitioning an Application Support Services Summary TroubleShooting Jini version 2.02 The Chapter that Shouldn't Exist Java Packages Jini Versions Jini Packages Lookup Service RMI Stubs Debugging Discovering a Lookup Service version 2.02 Lookup Service Unicast discovery Broadcast discovery ServiceRegistrar Summary Entry Objects version 2.02 Entry class Restrictions on entries Convenience Classes Further Uses of Entries Summary Service Registration version 2.02 ServiceRegistrar ServiceItem Registration ServiceRegistration Entries Summary Client Search version 0.04 ServiceRegistrar ServiceMatches Matching Summary Leasing version 2.02 Leases LeaseRenewalManager Granting and handling leases Summary Summary Simple Example version 2.02 Problem Description Service Specification Common Classes Client Service Proxy Uploading a Complete Service Summary Choices for Service Architecture version 2.02 Proxy Choices RMI Proxy for FileClassifier Non-RMI Proxy for FileClassifier RMI and non-RMI Proxies for FileClassifier Using the Naming service Using Other Services Discovery Management version 2.02 Management Interfaces LookupLocatorDiscovery LookupDiscoveryManager Conclusion Join Manager version 2.02 Join Manager Jini 1.0 JoinManager Summary Security version 2.03 Quick Fix Why AllPermission is Bad Removing AllPermission Jini with Protection Service Requirements Client Requirements ServiceRegistrar Transaction Manager and other Activatable Services rmid Being Paranoic More Complex Examples version 2.02 Where is the Code Running threads from discovery Inexact Service Matching Matching using Local Services Finding a Service Once Only Leased Changes to a Service Remote Events version 2.02 Event Models Remote Events Event Registration Listener List Listener Source File Classifier with Events Monitoring Changes in Services Summary ServiceDiscoveryManager version 2.06 Introduction ServiceItemFilter Finding a Service Immediately Using a Filter Building a Cache of Services Monitoring Changes to the Cache Summary Transactions version 0.11 Introduction Transactions TransactionManager TransactionParticipant Mahalo Example Summary Lego MindStorms version 2.02 Making Hardware into Jini Services MindStorms MindStorms as a Jini Service RCXPort RCX Programs Jini classes Getting it running Entry objects for a robot A client-side RCX class Higher level mechanisms: Not Quite C Summary CORBA and Jini version 0.12 CORBA CORBA to Java Mapping Jini Proxies Simple Example Room Booking Example Migrating a CORBA Client to Jini Jini Service as a CORBA Object Summary User Interfaces for Jini Services version 2.03 User Interfaces as Entries User Interfaces from Factory Objects Current Factories Marshalling Factories File Classifier Example Objects Returned from getUI() Support Classes Images MindStorms Summary Activation version 2.02 Introduction A Service using Activation LeaseRenewalService LookupDiscoveryService Summary Architecture version 2.02 Threads Appendices Properties used in Jini Files The source to the programs is available as a zip file programs.zip. The compiled classes are available as a zip file classes.zip. The documentation files are also available as a zip file docs.zip. 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, xml_handler.pl, is a handler called by my Apache Web server to deliver XML files as HTML. Postscript versions of the documentation files are in postscript.zip. 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. 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 jan@newmarch.name with subject ``Jini tutorial update'' 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 jan@newmarch.name Other Resources The Jini FAQ at http://www.artima.com/jini/faq.html Jini Community Web Site http://www.jini.org/ Noel Enete's ``Nuggets'' tutorial at www.enete.com/download/#_nuggets_ Eran Davidov's timeservice example at www.artima.com/jini/resources/timeservice.html Roger Whitney's lecture notes on ``Java Distributed Computing'' at http://www.eli.sdsu.edu/courses/spring99/cs696/notes/ Benoît Marchal's articles for Digital Cat's Java Resource Center at www.javacats.com/US/articles/Ben/Jini1.html (and Jini2.html, Jini3.html, etc) Jini Home page http://www.sun.com/jini/index.html RMI Home page http://java.sun.com/products/jdk/rmi/index.html Jini mailing list jini-users@java.sun.com Jini mailing list archives http://archives.java.sun.com/archives/jini-users.html RMI mailing list rmi-users@java.sun.com RMI mailing list archives http://archives.java.sun.com/archives/rmi-users.html Jini Interface Repository for standardised service interfaces (empty at present) http://www.artima.com/jini/interrepo/ Changes See the file Changes for the list of version releases and changes made between versions. 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... Acknowledgements The author is grateful for comments on this tutorial from Brian Jeltema, jeltema@richdist.east.sun.com Roger Whitney, whitney@cs.sdsu.edu Robbert van den Beld, rbe@mms-dresden.de Chitrarasu Muthaiyan, chitrarasu@cswl.com Stuart Remphrey, Stuart.Remphrey@Aus.Sun.COM JJ Larrea, jlarrea@redtop.com John McClain, John.McClain@East.Sun.COM Bob Scheifler, rws@east.sun.com The author is currently on a sabbatical program at the CRC for Distributed Systems Technology, http://www.dstc.edu.au 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. ©right;