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

📄 readme

📁 JavaJNDI examples of J[2]EE
💻
字号:
This example is a modified version of the "hello world" example fromthe Java IDL release. (http://java.sun.com/products/jdk/1.2/docs/guide/idl/).It has been modified to use JNDI to access the COS Name Server, instead of using the COS Naming package directly.In the following discussion, assume that you have installed a JDK 1.1compatible version of Java IDL in the directory $JAVAIDL, or are usingJDK 1.2.helloClient.java and helloServer.java are the orginal source files.helloClient2.java and helloServer2.java are modified source files thatuse JNDI.-------------------In order to run this example, do the following:1. Start the COS Name Server (default port is 900)# $JAVAIDL/bin/tnameserv -ORBInitialPort 10502. Add IDL, JNDI, and the COS Naming provider to your classpath.# setenv CLASSPATH $CLASSPATH\:$JAVAIDL/lib/classes.zip\: \	$JNDI/lib/jndi.jar\:$JNDI/lib/providerutil.jar\:$JNDI/lib/cosnaming.jar3. Compile the source files.# cd HelloApp# javac hello.java _helloStub.java _helloImplBase.java helloHelper.java helloHolder.java# cd ..# javac helloClient2.java helloServer2.java4. Set a variable that tells JNDI to use the COS Naming service provider.# setenv CF "-Djava.naming.factory.initial=com.sun.jndi.cosnaming.CNCtxFactory"5. Start the application's server. (use same number or default as nameserv)# java $CF -Dorg.omg.CORBA.ORBInitialPort=1050 helloServer2 6. Run the application's client.# java $CF -Dorg.omg.CORBA.ORBInitialPort=1050 helloClient2

⌨️ 快捷键说明

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