Configuration steps

1. Configure the external cache group on the appservers (in our case Trade3Server1, Trade3Server2, and Trade3Server3). Follow the steps outlined in WebSphere External Cache configuration and create an external cache group called "AFPA". Then add a member with these parameters: Address: hostame:port Adapter bean name: com.ibm.ws.cache.servlet.Afpa

2. Add a cache policy to the cachespec.xml file for the servlet or JSP file you want to cache. In our example we added
<property name="ExternalCache">afpa</property>
for all entries that should be cached by FRCA.

Example 14-15 Cache entry for marketSummary.jsp

<cache-entry>
	<class>servlet</class>
	<name>/marketSummary.jsp</name>
	<property name="ExternalCache">afpa</property>
	<cache-id>
		<priority>3</priority>
		<timeout>180</timeout>
	</cache-id>
	<dependency-id>MarketSummary
	</dependency-id>
</cache-entry>

3. Modify the IBM HTTP Server configuration and add the following directives at the end of the httpd.conf file (see Example 14-16):

Example 14-16 AFPA adapter configuration in httpd.conf file

AfpaEnable 
AfpaCache on 
AfpaLogFile "<install_root>\IBMHttpServer\logs\afpalog" V-ECLF 
LoadModule afpaplugin_module <install_root>/bin/afpaplugin.dl
AfpaPluginHost WAS_Hostname:port

AfpaPluginHost WAS_Hostname:port specifies the host name and port of the appserver. These are the same values as you have specified in the Address field when configuring the external cache group member (step 1).

The LoadModule directive loads the IBM HTTP Server plug-in that connects the Fast Response Cache Accelerator to the WAS fragment cache. If multiple IBM HTTP Servers are routing requests to a single appserver, add the directives from Example 14-16 to the httpd.conf file of each of these IBM HTTP Servers for distributed platforms. If one IBM HTTP Server is routing requests to a cluster of appservers, add the AfpaPluginHost WAS_Hostname:port directive to the httpd.conf file for each application server in the cluster. For example, if there are three application servers in the cluster (Trade3Server1, Trade3Server2, Trade3Server3) add an AfpaPluginHost directive for each application server as shown in Example 14-17):

Example 14-17 AFPA adapter configuration in httpd.conf file for appserver cluster

AfpaPluginHost Trade3Server1:9001
AfpaPluginHost Trade3Server1:9002
AfpaPluginHost Trade3Server1:9003

  Prev | Home | Next

 

WebSphere is a trademark of the IBM Corporation in the United States, other countries, or both.

 

IBM is a trademark of the IBM Corporation in the United States, other countries, or both.