上述分类是我google了很多资源后对常用服务器的jndi分类的一个理解。(不知是否正确),为了验证我的理解,我在jboss里面同时部署了2个web应用a.war,b.war,在这2个web应用里面使用同样的代码列出jndi树,代码如下: Enumeration i1 = new InitialContext().listBindings(""); // Global namespace
将java:/这个context中的内容打印出来,以下是部分结果: ........... is not a context:TransactionPropagationContextExporter 14:33:36,169 INFO [syn_cen] is not a context:ConnectionFactory 14:33:36,169 INFO [syn_cen] is not a context:DefaultJMSProvider 14:33:36,170 INFO [syn_cen] is not a context:testds 14:33:36,171 INFO [syn_cen] is not a context:XAConnectionFactory 14:33:36,172 INFO [syn_cen] is not a context:Mail 14:33:36,174 INFO [syn_cen] is a context:timedCacheFactory 14:33:36,174 INFO [STDOUT] error.org.jboss.util.TimedCachePolicy 14:33:36,175 INFO [syn_cen] is not a context:SecurityProxyFactory 14:33:36,175 INFO [syn_cen] is a context:comp 14:33:36,176 INFO [syn_cen] is not a context:---UserTransaction .....................