Cache Helper Class Property Editor

Sun ONE Application Server has the capability to determine caching criteria programmatically by writing a cache helper class. This property editor enables you to specify a custom class that implements the CacheHelper interface. You open the Cache Helper Class property editor by selecting the Cache Helper Class property and its ellipsis (...) button from the Sun ONE AS pane of the web.xml property sheet.

Adding a cache helper class

To add a cache helper class:

  1. From the Cache Helper Class property editor, click Add.
  2. Type a unique name for the helper class, which is referenced in the Cache Mapping table of the Cache property editor.
  3. Type a fully qualified class name of the cache helper, which must implement the com.sun.appserv.web.CacheHelper interface, in the ClassName field.
  4. Click OK. The information you have specified is reflected in the property editor.
  5. Click the Properties column of the helper class item. A Cache Helper dialog box opens.
  6. Use the Add button to add any parameters for the cache helper class.
  7. Click OK. The property editor shows the number of parameters added in the previous step.
  8. You may add additional help class by clicking Add.

Removing a cache helper class

To remove a cache helper class:

  1. From the Cache Helper Class property editor, select the helper class and click Remove. The helper class is removed from the table.

Using a cache helper class

The cache helper classes are used for specifying cacheability constraints from the Cache property editor. To specify a cacheability constraint using the cache helper class:

  1. Add the cache helper class in the Cache Helper Class property editor.
  2. Open the Cache property editor from the Sun ONE AS pane of the web.xml property sheet.
  3. Click Add.
  4. Select ServletName or UrlPattern from the drop-down list and type its value.
  5. Select CacheHelperRef from the drop-down list.
  6. Select the name for the cache helper class.
  7. Click OK. The name is displayed in the Cache Reference Value field.

See also
   Web Module Property Sheet: Sun ONE AS Tab
Cache Property Editor

Legal Notices