Properties props = System.getProperties();
props.put(Context.INITIAL_CONTEXT_FACTORY,
"org.jnp.interfaces.NamingContextFactory");Context ctx = new InitialContext(props);需要你在环境中或者是系统属性中加入具体的JNDI工厂可以到sun的网站上下载不同的jndi包,上面的例子是ejb的我以前试过没有单独绑定字符串的jndi
props.put(Context.INITIAL_CONTEXT_FACTORY,
"org.jnp.interfaces.NamingContextFactory");Context ctx = new InitialContext(props);需要你在环境中或者是系统属性中加入具体的JNDI工厂可以到sun的网站上下载不同的jndi包,上面的例子是ejb的我以前试过没有单独绑定字符串的jndi
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货