[Java programming language only]

Configuring the default dynamic cache instance (baseCache)

The default dynamic cache instance, also known as baseCache, is the default of a dynamic cache instance created by the WebSphere® Application Server dynamic cache service. This servlet dynamic cache instance is used by products such as IBM WebSphere Commerce. Unlike other cache instances defined with WebSphere Application Server, baseCache is specific to a single server or cluster instance. Use this procedure to configure the baseCache instance in WebSphere Application Server for use with WebSphere eXtreme Scale as the dynamic cache provider.

Before you begin

About this task

The steps in this procedure are for Version 8.0 of the WebSphere Application Server administrative console. This information may vary slightly depending on the version of WebSphere Application Server you are using.
Note:
  • WebSphere eXtreme Scale Version 8.6 is not supported on versions of WebSphere Application Server prior to Version 7.0.
  • The following procedure is specific to the remote WebSphere eXtreme Scale dynamic cache topology. All other topologies, including embedded, embedded-partitioned, and local, are now deprecated in WebSphere eXtreme Scale Version 8.6.
  • The following procedure assumes that you are using WebSphere Application Server V7.0 Fix Pack 27, V8.0 Fix Pack 6, V8.5 Fix Pack 2 or higher. WebSphere Application Server APAR PM71992 is included in these versions.

Procedure

  1. Start the WebSphere Application Server administrative console.
  2. In the menu, click Servers > Server Type > WebSphere application servers.
  3. In the Application servers area, select your server name.
  4. In the Configuration panel, click Container Services and select Dynamic cache service.
  5. From the Cache provider drop-down list, select WebSphere eXtreme Scale.
    Note: If you do not see WebSphere eXtreme Scale as a dynamic cache provider, then your WebSphere Application Server profile has not been augmented for WebSphere eXtreme Scale. For more information, see Creating and augmenting profiles for WebSphere eXtreme Scale.
  6. If you want to change the cache size, specify it in the Cache size box.
    The cache size value specifies the maximum number of entries allowed in each partition within a WebSphere eXtreme Scale grid for this dynamic cache instance. The default is 2000 entries in each partition.
  7. Select Enable cache replication.
    Enabling this check box means that cached data is stored remotely in the data grid and not locally. When you use WebSphere eXtreme Scale as the cache provider, you must select this option.
  8. Click Apply or OK and save the configuration.
  9. In the menu, click Servers > Server Type > WebSphere application servers.
  10. In the Application servers area, select your server name.
  11. In the Configuration panel, click Web Container Settings and select Web container.
  12. Select the Enable servlet caching check box.
  13. Click Apply or OK and save the configuration.

What to do next

By default, each dynamic cache instance that is configured on WebSphere Application Server corresponds to a dynamic cache data grid that has the same name as the JNDI name of the cache instance. Also, by default, the data for that cache instance is stored in a dynamic map within that dynamic cache data grid, and the suffix for that dynamic map name also corresponds to the JNDI name of the cache instance. For example, if you were to configure a cache instance on WebSphere Application Server with a JNDI name of cache1, then a dynamic cache data grid is created with the name cache1. Inside data grid cache1, a dynamic map named IBM_DC_PARTIONED_cache1 is created to store the data.

In most cases, this configuration does not need to be changed. However, in some circumstances, you might want multiple cache instances, with different JNDI names, to map to different dynamic maps within the same data grid instance. In other circumstances, you might want multiple cache instances, with the same JNDI name, to map to different dynamic cache data grid instances or different dynamic map instances within the same dynamic cache data grid. For example, if you have an application that uses the default dynamic cache instance (baseCache), you might want to use the same data grid for both of your test level and production level environments, while you keep the cached data in separate data grids or separate dynamic maps within the same data grid.

You can set the following custom properties on the cache instances to control this configuration:
Tip: These properties can be especially useful when you use the default dynamic cache instance (baseCache), since the JNDI name for the cache is automatically set to baseCache and cannot be changed.
com.ibm.websphere.xs.dynacache.grid_name
Use this custom property to specify the name of the dynamic cache data grid instance to which a dynamic cache instance corresponds.
com.ibm.websphere.xs.dynacache.cache_name
Use this custom property to specify the name to be used, in place of the JNDI name, for both the dynamic cache data grid name and the dynamic map inside that data grid. If the com.ibm.websphere.xs.dynacache.grid_name custom property is also set, then the value of this property applies only to the dynamic map name.
For information about how to set these properties, see Customizing a dynamic cache instance with custom properties.