WebSphere Application Server - Express, Version 6.0.x     Operating Systems: AIX, HP-UX, Linux, Solaris, Windows

Using object cache instances

Before you begin

Before you begin, enable the dynamic cache service. See Enabling the dynamic cache service for more information.

Why and when to perform this task

Perform this task so that your application can access dynamic cache object cache instances with the DistributedMap or DistributedObjectCache interfaces. Using object cache instances can improve the performance of your application because you can programmatically store and share frequently used objects. By using object cache instances, you also have the necessary control over the dynamic cache when you are running multiple applications in an application server. See Cache instances for more information.

Steps for this task

  1. Configure one or more cache instances.
    1. In the administrative console, click Resources > Cache instances > Object cache instances.
    2. Specify the scope for the cache instance.

      Cell scope makes the cache instance available to all servers within the cell. Node scope makes the cache instance available to all servers on the particular node. Cluster scope makes the cache instance available to all members in a specified cluster. Server scope makes the cache instance available to only the selected server. You can mix scopes if necessary.

    3. Click Apply after changing the scope.
    4. Click New.
    5. Enter the Java Naming and Directory Interface (JNDI) name for this cache instance.

      This is name that you pass to the InitialContext lookup() method from within your application. For example, services/cache/instance_one.

    6. Enter or modify other properties as needed.
  2. Update your application. To store and retrieve objects in an object cache instance, you need a DistributedMap or DistributedObjectCache reference for the named object cache instance. See Using the DistributedMap and DistributedObjectCache interfaces for the dynamic cache for more information.

Result

You configured object cache instances that you can access programmatically with the DistributedMap and DistributedObjectCache interfaces.

What to do next

See Reference: Generated API documentation for more information about the DistributedMap or DistributedObjectCache interfaces.



Related concepts
Cache instances

Related tasks
Using the DistributedMap and DistributedObjectCache interfaces for the dynamic cache

Task topic    

Terms of Use | Feedback

Last updated: Jun 8, 2005 12:45:23 PM EDT
http://publib.boulder.ibm.com/infocenter/wasinfo/v6r0/index.jsp?topic=/com.ibm.websphere.express.doc/info/exp/ae/tdyn_cacheinstances.html

© Copyright IBM Corporation 2004, 2005. All Rights Reserved.
This information center is powered by Eclipse technology. (http://www.eclipse.org)