开发者

Specify cache expiry for com.sun.jndi.dns.DnsContextFactory?

开发者 https://www.devze.com 2022-12-28 13:10 出处:网络
Struggling to find comprehensive documentation for JNDI and DNS. There is some here but it\'s rather limited.

Struggling to find comprehensive documentation for JNDI and DNS. There is some here but it's rather limited.

Specific question: Is it possible to control the caching behaviour of lookups against DNS using com.sun.jndi开发者_如何学编程.dns.DnsContextFactory, for example to say 'do not cache'.

Example code:

Hashtable<String, String> env = new Hashtable<String, String>();
env.put("java.naming.factory.initial", "com.sun.jndi.dns.DnsContextFactory");
env.put("java.naming.provider.url", "dns://mydns/mycompany.com");
....
DirContext ictx = new InitialDirContext(env);

Additionally, is there some comprehensive API documentation that I haven't yet found?

0

精彩评论

暂无评论...
验证码 换一张
取 消