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:
-
From the Cache Helper Class property editor,
click Add.
-
Type a unique name for the helper class, which is
referenced in the Cache Mapping table of the
Cache property editor.
-
Type a fully qualified class name of the cache helper,
which must implement the
com.sun.appserv.web.CacheHelper interface,
in the ClassName field.
-
Click OK.
The information you have specified is reflected
in the property editor.
-
Click the Properties column of the helper class item.
A Cache Helper dialog box opens.
-
Use the Add button to add any parameters for
the cache helper class.
-
Click OK.
The property editor shows the number of parameters added in
the previous step.
-
You may add additional help class by clicking Add.
Removing a cache helper class
To remove a cache helper class:
-
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:
-
Add the cache helper class in
the Cache Helper Class property editor.
-
Open the
Cache property editor
from the Sun ONE AS pane
of the web.xml property sheet.
-
Click Add.
-
Select ServletName or UrlPattern
from the drop-down list
and type its value.
-
Select CacheHelperRef from the drop-down list.
-
Select the name for the cache helper class.
-
Click OK. The name is displayed in the Cache Reference Value field.
Legal Notices