请问一个jndi连接的小问题

07-01-05 sakas

开始初始化的时候

Properties p = new Properties();

p.setProperty("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");

p.setProperty("java.naming.provider.url", "localhost:1099");

这样运行正常

如果将localhost改为我的ip也就是

Properties p = new Properties();

p.setProperty("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");

p.setProperty("java.naming.provider.url", "172.16.21.198:1099");

结果就报错 时间超时

Failed to get SequenceGeneratorHome: caught javax.naming.CommunicationException: Receive timed out [Root exception is java.net.SocketTimeoutException: Receive timed out]

请问是什么原因

sakas
2007-01-05 16:01

哦 原来是我ip写错了

matt8
2007-01-08 13:40

呵呵