現在、これをJBossに使用していますが、外部Tomcatにも何かが必要です。
Properties props = new Properties();
props.put(Context.PROVIDER_URL, "jnp://localhost:1099");
props.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
props.put(Context.URL_PKG_PREFIXES, "org.jboss.naming.client");
props.put("j2ee.clientName", "abtest");
Googleで検索すると、これが見つかりましたが、JNDI接続を受け入れるように構成されているTomcatのポートがわかりません...
props.put(Context.INITIAL_CONTEXT_FACTORY,
"org.apache.naming.java.javaURLContextFactory");
props.put(Context.PROVIDER_URL, "http://localhost:???");
助けてくれますか?