标题: Redistribution JNP Server: Standalone Naming Service From JBoss 3.2.7 [打印本页] 作者: key 时间: 2-10-2009 17:46 标题: Redistribution JNP Server: Standalone Naming Service From JBoss 3.2.7 I need JNDI service for my server-side application running without J2EE
platform. I chose JND Server from JBoss, which was introduced here:
However, the article above was posted in 2002. There are some incompatible
issues for the newer version of JBoss. Now I extracted the JNP Server from
JBoss 3.2.7, the lowest stable version I can find from the official website.
Usage
1. Make sure you've install JRE and ANT, and set the environment variables
such as PATH and JAVA_HOME properly.
2. Uncompress my ZIP file into a directory, e.g. /opt/jnpserver-3.2.7 in Linux
or C:\tools\jnpserver-3.2.7
3. Change to the directory
4. Run ant
$ant
That's all.
You will get a standalone JNDI service running at port 1099.
[ 本帖最后由 key 于 2-10-2009 16:50 编辑 ]作者: key 时间: 2-10-2009 18:05 标题: Test Case for the JNP Server import javax.naming.Context;
import javax.naming.InitialContext;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
/**
*
* @author key - freeoz
*/
public class SimpleTest {
private static int testValue;