jboss 5.1.0 jnp 访问 localhost可以,本机ip不可以
我的编程连接属性如下:
pro=new Properties(); pro.setProperty("java.naming.factory.initial","org.jnp.interfaces.NamingContextFactory"); pro.setProperty("java.naming.provider.url", "jnp://"+host+":"+port); pro.setProperty("java.naming.factory.url.pkgs","org.jboss.naming:org.jnp.interfaces"); //set the connection timeout pro.put("jnp.timeout", String.valueOf(timeOut*1000)); InitialContext ic = new InitialContext(pro); rmiAdaptor = (RMIAdaptor) ic.lookup("jmx/rmi/RMIAdaptor");