⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 jndi-ext.html

📁 在JAVA编程中对JNDI的支持.是一个开放的源码.
💻 HTML
字号:
<HTML><HEAD><title>JNDI 1.2 Optional Package</title></HEAD><BODY BGCOLOR="#FFFFFF" TEXT=#000000 LINK=#0000ff VLINK=#000077ALINK=#ff0000><hr SIZE=3 NOSHADE WIDTH="100%"><center><h1>Java Naming and Directory Interface<font size=4><sup>TM</sup></font> (JNDI) 1.2<br>Optional Package</h1></center><hr SIZE=3 NOSHADE WIDTH="100%"><P><FONT SIZE=-1>Please send feedback to <a href="mailto:jndi@java.sun.com">jndi@java.sun.com</a></FONT><P><P><I>Table of Contents</I><UL><LI><A HREF="#INTRO">Introduction</A></LI><LI>  <A HREF="#JDK12">Java<sup>TM</sup> 2 SDK, Standard Edition, v 1.2.x</A></LI>   <LI><A HREF="#JDK11">JDK<sup>TM</sup> 1.1.x</A></LI></UL><P><HR><P><A NAME="INTRO"><H2>Introduction</H2><p>This document describes how to use the JNDI 1.2 Optional Package with theJava 2 SDK, Standard Edition, v 1.2.x,and the JDK 1.1.x.See the <a href=http://java.sun.com/products/jndi/tutorial>JNDI Tutorial</a>for detailed descriptions and examples.<HR><p><A NAME="JDK12"><H2>Java 2 SDK, Standard Edition, v 1.2.x</H2><p><h4>Software Dependencies</h4><ul><li>One or more <a href=http://java.sun.com/products/jndi/serviceproviders.html>JNDI 1.2 service providers</a>.</ul><h4>Software Installation</h4><ol><li>Unzip the distribution file to get a <tt>lib</tt> directory. <li>If you are using JNDI as an <em>installed</em>extension, copy the <tt>jndi.jar</tt> filefrom the <tt>lib</tt> directory to the <tt>$JAVA_HOME/jre/lib/ext</tt> directory.<li>If you are not using JNDI as an installed extension,copy the <tt>jndi.jar</tt> file to its permanent location and add its locationto your classpath.</ol> <a NAME=SEC><h4>Security Considerations</h4></a>When a <tt>Reference</tt> is read from the naming or directory serviceand a codebase specifying where to load the factory class for thereference has been specified, JNDI will attempt to load the class from thelocations specified in code base. In order for the class loading to succeed,you must grant the application the permissions appropriate for theURLs named in the codebase. For example, if the URL scheme is "http" or "ftp",you must grant the application the appropriate <tt>java.net.SocketPermission</tt>; if the URL scheme is "file", youmust grant the application the appropriate<tt>java.io.FilePermission</tt>.<p>If you are using JNDI as an installed extension, that is, <tt>jndi.jar</tt>has been installed in the <tt>$JAVA_HOME/jre/lib/ext</tt> directory, you need to take no further action.<p>Otherwise, you must grant the following permissions to <tt>jndi.jar</tt>:<p><pre>permission java.util.PropertyPermission "java.naming.factory.initial", "read";permission java.util.PropertyPermission "java.naming.factory.object", "read";permission java.util.PropertyPermission "java.naming.factory.url.pkgs", "read";permission java.util.PropertyPermission "java.naming.factory.state", "read";permission java.util.PropertyPermission "java.naming.factory.control", "read";permission java.util.PropertyPermission "java.naming.provider.url", "read";permission java.util.PropertyPermission "java.naming.dns.url", "read";permission java.io.FilePermission "${jndi.home}${/}lib${/}*", "read";</pre>You must also grant the permissions required for class loadingdescribed above to <tt>jndi.jar</tt>.<p>In addition, you must grant the following permission <tt>jndi.jar</tt>if the application/applet code is loaded using a different classloaderthan the one that loaded <tt>jndi.jar</tt>. If the application/appletcode is in the same classpath as <tt>jndi.jar</tt>, then you <em>donot</em> need to do this.<pre>permission java.lang.RuntimePermission "getClassLoader";</pre><hr><p><A NAME="JDK11"><H2>JDK 1.1.x</h2><p><h4>Software Dependencies</h4><ul><li>One or more <a href=http://java.sun.com/products/jndi/serviceproviders.html>JNDI 1.2 service providers</a>.</ul><h4>Software Installation</h4><ol><li>Unzip the distribution file to get a <tt>lib</tt> directory. <li>Copy the <tt>jndi.jar</tt>from the <tt>lib</tt> directory to its permanent location.<li>Add the location of the <tt>jndi.jar</tt> to your classpath.</ol><h4>Security Considerations</h4>When a <tt>Reference</tt> is read from the naming or directory serviceand a codebase specifying where to load the factory class for thereference has been specified, JNDI will attempt to load the class using the <tt>RMIClassLoader</tt>. In order for the class loadingto succeed, the application must have installeda security manager.For example, you can install the <tt>RMISecurityManager</tt> as follows:<blockquote><pre>System.setSecurityManager(new java.rmi.RMISecurityManager());</pre></blockquote><HR SIZE=3 NOSHADE WIDTH=100%><br><i>Copyright &copy; 1999 Sun Microsystems, Inc., All Rights Reserved.</i>    </body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -