Adding Expiry-Based Caching You built a portlet using the wizard and successfully added it to a page.

Enhancing Java Portlets 7-67 same as the application server administrators password. For example, suppose you installed Oracle Application Server in D:\as904, with an invalidation port user name of invalidator and a password of welcome. You would run the following command: D:\as904\jdk\bin\java -classpath D:\as904\j2ee\home\shared-lib\oracle.jpdk\1.0\pdkjava.jar oracle.webdb.provider.v2.cache.Obfuscate invalidator:welcome If successful, the command should print a hexadecimal string like the following: 0510198d5df8efd5779406342be2528aa0cccb179ea6b77baf49f019f5075a3a11 Now, use this information to create a JAWC configuration file, cache.xml, which specifies one or more Oracle Web Cache instances and their invalidation ports. For example: ?xml version=1.0? webcache invalidation host=cache.mycompany.com port=4001 authorization=0510198d5df8efd5779406342be2528aa0cccb179ea6b77baf49f019f5075a3a11 webcache JAWC finds this configuration file using the system property file. To set this system property for a Oracle WebLogic Server, simply add an appropriate line to the .product.properties file for the particular instance in which PDK-Java is installed for example, MW_HOMEwlserver_10.3.product.properties and then restart that instance.

7.2.9.4.3 Configuring the XML Provider Definition Using a combination of tags in

provider.xml, you can activate automatic invalidation-based caching for an entire portlet or some of its pages. To turn on automatic invalidation-based caching, you need to declare it as follows either at the level of individual pages or the renderer, to indicate that invalidation-based caching should be activated for all pages: useInvalidationCachingtrueuseInvalidationCaching If your portlet supports personalization through the Edit or Edit Defaults modes, you may also want to declare autoInvalidatetrueautoInvalidate for your renderer. This declaration causes invalidation of all the cached content for the portlet Note: The command that follows assumes that pdkjava.jar and jawc.jar are present in ORACLE_ HOME j2eehomeshared-liboracle.jpdk1.0, as required by the PDK-Java installation guide. If you are using a standalone Oracle Containers for Java EE installation, you need to substitute in the path to the java executable an external Java 2 SDK installation. Note: Since the location of the cache configuration file is defined as a system property, only one cache may be defined for each server instance. It is not possible to have two different Web Provider instances behind separate Oracle Web Cache configurations.