使用 Servlet 快取實例
請利用這個作業來配置 Servlet 快取實例。
開始之前
關於這項作業
程序
- 啟用 Servlet 快取。 請參閱「配置 Servlet 快取」主題,以取得相關資訊。
- 配置一或多個快取實例。
- 在「管理主控台」中,按一下資源 > 快取實例 > Servlet 快取實例。
- 指定快取實例的範圍。 指定 Cell 範圍,會使快取實例可供 Cell 內的所有伺服器使用。
節點範圍會使快取實例可供節點中的所有伺服器使用。
伺服器範圍會使快取實例只供所選的伺服器使用。
必要的話,您可以混合範圍。註: 您無法利用相同的快取名稱或 JNDI 名稱,在不同的範圍建立快取實例(物件或 Servlet)。
- 按一下套用來儲存範圍。
- 指定快取實例的設定。 需要「名稱」以及「 Java™ 命名和目錄介面 (JNDI) 名稱」欄位。
JNDI 名稱是 cachepec.xml 檔的 <cache-instance> 元素中所指定的 name 屬性。
cachespec.xml 檔中指定的 JNDI 名稱範例如下:
在這個範例中,請指定 services/cache/instance_one 作為 JNDI 名稱。<cache-instance name="services/cache/instance_one">
- 更新您的應用程式。 如果要使用 Servlet 快取實例,您必須指定名稱與這個快取實例的 JNDI 名稱相同的 <cache-instance> 元素。
次主題
Invalidating entries in a servlet cache
Use this task to invalidate a cache entry from a servlet cache instance.Servlet cache instance collection
A servlet cache instance is a location, in addition to the default shared dynamic cache, where dynamic cache can store, distribute, and share data. By using servlet cache instances, your applications have greater flexibility and better tuning of the cache resources. The Java Naming and Directory Interface (JNDI) name specified for the cache instance is mapped to the name attribute in the <cache-instance> tag in the cachespec.xml configuration file.Servlet cache instance settings
A servlet cache instance is a location, in addition to the default shared dynamic cache, where dynamic cache can store, distribute, and share data. By using servlet cache instances, your applications have greater flexibility and better tuning of the cache resources. The Java Naming and Directory Interface (JNDI) name specified for the cache instance is mapped to the name attribute in the <cache-instance> tag in the cachespec.xml configuration file.Using the DynamicContentProvider interface for dynamic cache
Use this task to configure the DynamicContentProvider interface for cached servlets and JavaServer Pages (JSP) files.
相關概念:


http://www14.software.ibm.com/webapp/wsbroker/redirect?version=cord&product=was-nd-mp&topic=tdyn_servletcacheinstance
檔名:tdyn_servletcacheinstance.html