| <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" | |
| "http://www.w3.org/TR/html4/loose.dtd"> | |
| <html> | |
| <head> | |
| <meta http-equiv="Content-Type" content= | |
| "text/html; charset=windows-1252"> | |
| <title> | |
| DRL RMI Registry Service Provider for JNDI | |
| </title> | |
| <link rel="Stylesheet" type="text/css" media="all" href="../harmony.css"> | |
| </head> | |
| <body> | |
| <h1> <a name="top"></a>DRL RMI Registry Service Provider for JNDI </h1> | |
| <p class="TOCHeading"> | |
| <a href="#Revision_History">Revision History</a> | |
| </p> | |
| <p class="TOCHeading"> | |
| <a href="#Disclaimer_and_Legal">Disclaimer and Legal Information</a> | |
| </p> | |
| <p class="TOCHeading"> | |
| <a href="#About_This_Document">About This Document</a> | |
| </p> | |
| <p class="TOC"> | |
| <a href="#Purpose">Purpose</a> | |
| </p> | |
| <p class="TOC"> | |
| <a href="#Intended_Audience">Intended Audience</a> | |
| </p> | |
| <p class="TOC"> | |
| <a href="#Documentation_Conventions">Documentation Conventions</a> | |
| </p> | |
| <p class="TOCHeading"> | |
| <a href="#overview">RMI Provider Overview</a> | |
| </p> | |
| <p class="TOCHeading"> | |
| <a href="#drl">RMI Provider in DRL</a> | |
| </p> | |
| <p class="TOC"> | |
| <a href="#about">About</a> | |
| </p> | |
| <p class="TOC"> | |
| <a href="#environment">Environment Properties</a> | |
| </p> | |
| <p class="TOC"> | |
| <a href="#urls">RMI URLs</a> | |
| </p> | |
| <p class="TOC"> | |
| <a href="#bindings">Binding Registry Contexts and Remote Objects</a> | |
| </p> | |
| <p class="TOCHeading"> | |
| <a href="#References">References</a> | |
| </p> | |
| <h1> | |
| <a name="Revision_History"></a>Revision History | |
| </h1> | |
| <table border="0" cellpadding="0" width="100%"> | |
| <tr> | |
| <td width="24%" class="TableHeading"> | |
| Version | |
| </td> | |
| <td width="49%" class="TableHeading"> | |
| Version Information | |
| </td> | |
| <td class="TableHeading"> | |
| Date | |
| </td> | |
| </tr> | |
| <tr> | |
| <td width="24%" class="TableCell"> | |
| Initial version | |
| </td> | |
| <td width="49%" class="TableCell"> | |
| Vasily Zakharov, Nadya Morozova: document created. | |
| </td> | |
| <td class="TableCell"> | |
| March 23, 2006 | |
| </td> | |
| </tr> | |
| </table> | |
| <h1> | |
| <a name="Disclaimer_and_Legal"></a>Disclaimer and Legal Information | |
| </h1> | |
| <p> | |
| Copyright 2005-2006 The Apache Software Foundation or its licensors, as | |
| applicable. | |
| </p> | |
| <p> | |
| Licensed under the Apache License, Version 2.0 (the License); you may | |
| not use this file except in compliance with the License. You may | |
| obtain a copy of the License at <a href="http://www.apache.org/licenses/LICENSE-2.0"> | |
| http://www.apache.org/licenses/LICENSE-2.0</a>. </p> | |
| <p> | |
| Unless required by applicable law or agreed to in writing, software | |
| distributed under the License is distributed on an AS IS BASIS, | |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or | |
| implied. See the License for the specific language governing | |
| permissions and limitations under the License. | |
| </p> | |
| <h1> | |
| <a name="About_This_Document"></a>About This Document | |
| </h1> | |
| <h2> | |
| <a name="Purpose"></a>Purpose | |
| </h2> | |
| <p> This document describes the functionality of the DRL RMI [<a href="#RMIspec">2</a>] Registry Service | |
| Provider for JNDI [<a href="#Sunjndi">1</a>]. The document gives details on the provider design. </p> | |
| <h2> | |
| <a name="Intended_Audience"></a>Intended Audience | |
| </h2> | |
| <p> The target audience for the document includes a wide community of engineers | |
| interested in using the RMI registry in their JNDI applications and in further | |
| work with the product to contribute to its development. The document assumes | |
| that readers are familiar with RMI, JNDI and the Java programming language. | |
| </p> | |
| <h2> | |
| <a name="Documentation_Conventions"></a>Documentation Conventions | |
| </h2> | |
| <p> This document uses the <a href= "../conventions.htm"target= | |
| "_blank">unified conventions</a> for the DRL documentation kit. </p> | |
| <p class="backtotop"> | |
| <a href="#top">Back to Top</a> | |
| </p> | |
| <h1> | |
| <a name="overview"></a>RMI Provider Overview | |
| </h1> | |
| <p> The RMI registry context, based on a registry location, and the RMI Registry | |
| Service Provider allow JNDI applications to access remote objects bound in the | |
| RMI registry, as described in the Java<a name="*">*</a> RMI Specification [<a href="#RMIspec">2</a>]. </p> | |
| <p> | |
| The provider supplies JNDI with the same essential functionality as | |
| the <code>java.rmi.Naming</code> class does. | |
| </p> | |
| <p class="backtotop"> | |
| <a href="#top">Back to Top</a> | |
| </p> | |
| <h1> <a name="drl"></a>RMI Provider in DRL</h1> | |
| <h2> | |
| <a name="about"></a>About | |
| </h2> | |
| <p> The DRL RMI Service Provider is an independent implementation of the RMI Service Provider for JNDI. | |
| You can also consult additional information resources on RMI [<a href="#RMIspec">2</a>], RMI Service Provider [<a href="#RMIprovider">3</a>] and JNDI in general [<a href="#Sunjndi">1</a>]. </p> | |
| <p>The provider can store <code>java.rmi.Remote</code>, <code>javax.naming.Reference</code> | |
| and <code>javax.naming.Referenceable</code> objects. The RMI registry context | |
| and references to individual RMI objects can be bound into other JNDI contexts. | |
| The DRL provider does not support binding other contexts into the RMI registry, | |
| so that you cannot address objects in this context using composite name requests | |
| through the registry. </p> | |
| <p class="backtotop"> | |
| <a href="#top">Back to Top</a> | |
| </p> | |
| <h2> | |
| <a name="environment"></a>Environment Properties | |
| </h2> | |
| <p> In addition to the general properties [<a href="#RMIprovider">3</a>], the DRL RMI Registry | |
| Provider uses the following JNDI environment properties: </p> | |
| <dl> | |
| <dt> | |
| <a name="prop_initial"></a> | |
| <code>java.naming.factory.initial</code> | |
| </dt> | |
| <dd> | |
| Specifies the RMI registry service provider class name as the | |
| initial context factory to be used by the | |
| <code>javax.naming.InitialContext</code> class. | |
| <h3> | |
| Example | |
| </h3> | |
| <pre> | |
| env.put(Context.INITIAL_CONTEXT_FACTORY, | |
| "org.apache.harmony.jndi.provider.rmi.registry.RegistryContextFactory"); | |
| </pre> | |
| Use this property with the <code>java.naming.provider.url | |
| </code>property, which specifies the location of the RMI registry | |
| for the usage of the initial context. Otherwise, the initial | |
| context you created can only resolve complete RMI URLs. | |
| </dd> | |
| </dl> | |
| <dl> | |
| <dt> <a name="prop_socket"></a> <code>org.apache.harmony.jndi.provider.rmi.registry.clientSocketFactory</code> | |
| </dt> | |
| <dd> Can contain the name of a class implementing the<code> java.rmi.server.RMIClientSocketFactory</code> | |
| interface. The instance of this class is passed to the <code>java.rmi.registry.LocateRegistry.getRegistry()</code> | |
| method. </dd> | |
| </dl> | |
| <p class="backtotop"> | |
| <a href="#top">Back to Top</a> | |
| </p> | |
| <h2> | |
| <a name="urls"></a>RMI URLs | |
| </h2> | |
| <p> The URL context factory, <code>org.apache.harmony.jndi.provider.rmi.rmiURLContextFactory</code>, | |
| enables passing RMI URLs as names to the JNDI initial context. </p> | |
| <p class="backtotop"> | |
| <a href="#top">Back to Top</a> | |
| </p> | |
| <h2> | |
| <a name="bindings"></a>Binding Registry Contexts and Remote Objects | |
| </h2> | |
| <p> The class <code>org.apache.harmony.jndi.provider.rmi.registry.</code><code>RegistryContextFactory</code> | |
| implements the <code>javax.naming.spi.</code><code>ObjectFactory </code> interface | |
| and provides converting registry references into the corresponding registry | |
| contexts or remote objects. </p> | |
| <p class="backtotop"> | |
| <a href="#top">Back to Top</a> | |
| </p> | |
| <h1> | |
| <a name="References"></a>References | |
| </h1> | |
| <p> | |
| [<a name="Sunjndi">1</a>] Sun about JNDI, <a href= | |
| "http://java.sun.com/j2se/1.5.0/docs/guide/jndi/" target= | |
| "_blank">http://java.sun.com/j2se/1.5.0/docs/guide/jndi/</a> | |
| </p> | |
| <p> | |
| [<a name="RMIspec">2</a>] RMI Specification, <a href= | |
| "http://java.sun.com/j2se/1.5.0/docs/guide/rmi/spec/rmiTOC.html" target= | |
| "_blank">http://java.sun.com/j2se/1.5.0/docs/guide/rmi/spec/rmiTOC.html</a> | |
| </p> | |
| <p> | |
| [<a name="RMIprovider">3</a>] Sun's RMI Provider, <a href= | |
| "http://java.sun.com/j2se/1.5.0/docs/guide/jndi/jndi-rmi.html" target= | |
| "_blank">http://java.sun.com/j2se/1.5.0/docs/guide/jndi/jndi-rmi.html</a> | |
| </p> | |
| <p class="backtotop"> | |
| <a href="#top">Back to Top</a> | |
| </p> | |
| <p> | |
| <a name="*">*</a> Other brands and names are the property of their | |
| respective owners. | |
| </p> | |
| </body> | |
| </html> | |