Skip to Main Content

Java Security

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to see Contents of Cache

user13135626Mar 26 2013 — edited Mar 27 2013
Hi,

As we know that ,The InetAddress class has a cache to store successful as well as unsuccessful host name resolutions. By default, when a security manager is installed, in order to protect against DNS spoofing attacks, the result of positive host name resolutions are cached forever. When a security manager is not installed, the default behavior is to cache entries for a finite (implementation dependent) period of time. The result of unsuccessful host name resolution is cached for a very short period of time (10 seconds) to improve performance.


If the default behavior is not desired, then a Java security property can be set to a different Time-to-live (TTL) value for positive caching. Likewise, a system admin can configure a different negative caching TTL value when needed.

I want to know is there any way i can see Contents of above Naming Resolution Cache ? Where cache is stored and how can i see Contents of this Cache ?

Regards
Sahil Soni

Comments

EJP
The answer is (1) no, and (2) the cache is maintained somewhere behind InetAddress, possibly in the JNDI DNS provider, but because of (1) it really doesn't matter where it is.
1 - 1
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Apr 24 2013
Added on Mar 26 2013
1 comment
1,238 views