NullPointerException
) when I run the RegistrationTest
or the MultipleRegistrationTest
?
DefaultServiceAdmin
, my service is not in the list displayed by the LDJ Kit)
DefaultServiceAdmin
.
When I'm presented with the list of services, how do I know which one is mine?
com.sun.jini.compat.test.CodeDownloadTest
?
The Jini(TM) Technology Lookup, Discovery, and Join Compatibility Kit (LDJ Kit) is a set of free conformance tests, a test harness, and associated documentation, produced by Sun Microsystems, Inc.
The purpose of compatibility testing is to ensure that programs are good citizens in the environment of Jini technology-enabled services and/or devices (good lookup citizens). To be a good lookup citizen, a program must interoperate with other good lookup citizens and behave in a way that doesn't cause trouble for the rest of the networks, such as swamping a network with too much traffic. The rules of good citizenship are detailed in the Jini technology specifications and are, to a lesser extent, codified in the LDJ Kit.
This kit may not be used to fulfill any compliance requirements for code licensed under the Sun Community Source License v3.0/Jini Technology Specific Attachment v1.0 (SCSL3/Jini TSA 1.0).
The LDJ Kit is a free test suite that helps to ensure that your Jini technology-enabled client, service, or lookup service (hereafter referred to as "program") conforms with some very basic, but critical, Jini specification requirements. For more information on specifications covered by individual tests, see the Jini Technology Lookup, Discovery, and Join Compatibility Kit Test Descriptions document found in the LDJ Kit download.
This kit may not be used to fulfill any compliance requirements for code licensed under the Sun Community Source License v3.0/Jini Technology Specific Attachment v1.0 (SCSL3/Jini TSA 1.0).
The LDJ Kit is freely available from
http://starterkit.jini.org
.
You should use the latest LDJ Kit available at the download site listed above.
While you may use Java(TM) 2 SDK, v1.2.2 or later on any operating system configuration, we recommend that you use a platform on which the LDJ Kit has been tested if you encounter problems. These tested platforms are listed at http://java.sun.com/developer/products/jini/tested.html.
You should run all the tests in all the categories that apply to your program. For example, if your program is a Jini technology-enabled service (Jini service) that also acts as a Jini technology-enabled client (Jini client), then you should run both the client and service tests against your program. If your program is a Jini lookup service that also acts as a Jini service (registers in other lookups), then you should run both the service and lookup tests against your program. The tests contained in each category are:
com.sun.jini.compat.test.RequestPacketTest com.sun.jini.compat.test.UnicastRequestTest com.sun.jini.compat.test.CodeDownloadTest com.sun.jini.compat.test.AnnouncementResponseTest com.sun.jini.compat.test.RegistrationTest com.sun.jini.compat.test.MultipleRegistrationTest com.sun.jini.compat.test.PublicGroupTest com.sun.jini.compat.test.NonPublicGroupTest com.sun.jini.compat.test.MultipleGroupTest com.sun.jini.compat.test.LeaseTest |
com.sun.jini.compat.test.RequestPacketTest com.sun.jini.compat.test.UnicastRequestTest com.sun.jini.compat.test.CodeDownloadTest |
com.sun.jini.compat.test.LookupByServiceIDTest com.sun.jini.compat.test.LookupByClassTest com.sun.jini.compat.test.LookupBySuperClassTest com.sun.jini.compat.test.LookupByInterfaceTest com.sun.jini.compat.test.MultipleServiceLeaseRenewalTest com.sun.jini.compat.test.ServiceLeaseExpirationTest com.sun.jini.compat.test.ServiceIDTest com.sun.jini.compat.test.MultipleEventLeaseRenewalTest com.sun.jini.compat.test.EventLeaseExpirationTest |
You should run the LDJ Kit on at least one platform that supports Java 2 SDK, v1.2.2 or later. Which platform you use is entirely your choice.
To pass the LDJ Kit tests, Jini clients, services, and lookup services must be able to abide by the LDJ Kit good citizenship requirements, such as discovering and joining only lookup services in the "public" group. It is not required that every possible configuration be capable of passing the LDJ Kit, nor is it required that your program's default configuration be capable of passing; it is simply required that at least one configuration be capable of passing. If your service implementation uses the net.jini.lookup.JoinManager
to handle Jini discovery and join functions, this requirement of the LDJ Kit should be easily met.
An official run of the LDJ Kit is a single execution of the LDJ Kit test suite that meets certain requirements. These requirements are described in Passing the Jini Technology Lookup, Discovery, and Join Compatibility Kit, Section 2.1, found in the LDJ Kit download.
A successful official run of the three LDJ Kit client tests should take approximately five minutes. A successful official run of the ten LDJ Kit service tests should take approximately one hour. A successful official run of the nine LDJ Kit lookup tests should take approximately 30 minutes.
The LDJ Kit configuration file contains a commented-out property,
com.sun.jini.compat.unofficialQuietTime
, that can be used to reduce the wait time used by most tests. For an official run, the default value of 600000 milliseconds (10 minutes) or greater must be used for this property. However, for purposes of experimentation and debugging, you can reduce this to something smaller, such as 60000 milliseconds (one minute). Once you have resolved any problems, you must comment out this property to perform an official LDJ Kit run. This property is further documented in the LDJ Kit test descriptions and property file.
To automate the LDJ Kit testing for your program, you must implement your own specialized Admin object. See the next section of this FAQ for more information on how to implement your own Admin.
An "Admin" is an object that is responsible for starting and stopping the program you are testing. The LDJ Kit comes with three default Admins (one each for clients, services, and lookup services), which simply ask you to start and stop your program at the appropriate times determined by each test.
Yes! In fact it may be necessary to implement your own Admin in certain circumstances where the supplied default Admins do not work for your program. In addition, if you wish to automate LDJ Kit testing of your program, you will need to implement your own, specialized Admin object to start and stop your program automatically. To help you get started, the LDJ Kit download includes, as examples, the Admins used to automatically test the services found in the Jini(TM) Technology Starter Kit, v1.2.1_001 and v2.1. See the API docs and source files for the com.sun.jini.compat.admin1
and com.sun.jini.compat.admin2
packages in the LDJ Kit download.
See Implementing the Jini Technology Lookup, Discovery, and Join Compatibility Kit, v1.0 Admin Interface, found in the LDJ Kit download.
rmid
is started on the machine on which you are running the LDJ Kit.
com.sun.jini.compat.scratchDir
is in the correct format for the operating system on which you are testing and that you have permission to write to the specified directory.
DefaultServiceAdmin
, make sure you select the correct service from the list that is displayed by the LDJ Kit's DefaultServiceAdmin
.
The following questions and answers assume that you are familiar with the LDJ Kit test designs in the Jini Technology Lookup, Discovery, and Join Compatibility Kit Test Descriptions document found in the LDJ Kit download.
NullPointerException
) when I run the RegistrationTest
or the MultipleRegistrationTest
?CLASSPATH
used by the service's client (in this case the LDJ Kit).
DefaultServiceAdmin
, my service is not in the list displayed by the LDJ Kit)com.sun.jini.compat.scratchDir
is the wrong format for the operating system on which you are testing or you do not have permission to write to the specified directory.com.sun.jini.compat.scratchDir
is in the correct format for the operating system on which you are testing and that you have permission to write to the specified directory.PublicGroupTest
is the test that verifies this behavior.
ALL_GROUPS
.
DefaultServiceAdmin
. When I'm presented with the list of services, how do I know which one is mine?
The DefaultServiceAdmin
constructs each list element using the string form of the proxy's class name and the proxy's class annotation. The dynamic proxy's class name probably starts with $Proxy
and careful examination of the class annotation
should help you determine which service is the one you are testing.
com.sun.jini.compat.test.CodeDownloadTest
?