2.8.2 Clearing the Cache Used in Naming

You can clear the cache used in naming. However, you cannot specify the size of the cache to be cleared. This sub-section describes when the cache is cleared and the range that is cleared.

Organization of this subsection
(1) Timing for clearing the cache
(2) Cache-clearing range

(1) Timing for clearing the cache

The contents of the cache are cleared at one of the following timings:

(2) Cache-clearing range

This subsection describes the range in which the cache is cleared in a naming service.

The cache-clearing range is as follows:

  1. Clearing the complete cache area.
  2. Clearing only the invalid cache area.

In the first case, the complete cache area is cleared. On the other hand, in the second case, the objects stored in the cache are periodically checked for validity and only the invalid objects are cleared from the cache. Furthermore, in the second case, when the cache is cleared, the status of the CORBA Naming Services that have been searched once is also monitored. As a result, a CORBA Naming Service that has been searched once is not included in the search if the CORBA Naming Service is down. If you restart the CORBA Naming Service, the search of that CORBA Naming Service starts automatically.

For details on how to specify the settings for clearing the cache, see 2.8.3 Settings for using the caching functionality.

Also, if you want to use the error detection functionality, see 2.9.4 Execution environment settings (When the Error Detection functionality is used).

Reference note
When the re-connect functionality of the EJB home object is used, the cache does not become invalid even after the J2EE server is restarted.
Therefore, even if you specify settings to clear only the invalid cache area, the object references of the EJB home objects for the CORBA Naming Service are not deleted from the cache area.
The object references that are not deleted from the cache can be used as are to search (lookup) the EJB home object references.