OracleAS Web Cache improves performance by caching all kinds of content accessed via HTTP. Two other types of caches, Java Object Cache and Web Object Cache (described in the next section), are used specifically to support Java and web objects.
Java Object Cache is a service provided by OC4J. OC4J is the Java servlet, JSP, and EJB environment provided by Oracle Application Server, and was described in Chapter 6. Similar to OracleAS Web Cache, Java Object Cache allows the selective caching of content. However, Java Object Cache caching is performed within OC4J before content is generated by Java code. Java Object Cache also provides disk, pool, and stream-accessed caches in addition to a memory cache.
Figure 7-6 illustrates Java Object Cache’s use in OC4J. An HTTP request to a servlet or JSP in the web container, or an RMI request to an EJB in the EJB container, can access a cached object in Java Object Cache. The object in the cache can be loaded by a cache loader class that, in turn, can retrieve virtually any information it needs from any source.
Figure 7-6. Java Object Cache architecture
Java Object Cache exists to cache frequently accessed or expensive objects created by Java code. An expensive object is one that requires a significant amount of CPU resources or a great deal of time to generate. Any Java object type can be stored in Java Object ...