Configure WXS Dynacache with Commerce



Search Tips   |   Advanced Search

  1. On all catalog server hosts, start catalog service...

    cd $WXS_HOME/ObjectGrid/bin
    ./ catalog1

  2. On container server hosts, go to...


  3. Review settings in...

  4. Start container servers...
    cd $WXS_HOME/ObjectGrid/bin 
    ./ container1  \
          -objectGridFile $WXS_HOME/ObjectGrid/dynacache/etc/dynacache-remote-objectgrid.xml  \
          -deploymentPolicyFile $WXS_HOME/ObjectGrid/dynacache/etc/dynacache-remote-deployment.xml  \
          -catalogServiceEndPoints MyCatalogServer:2809 
    ./ container2  \
          -objectGridFile $WXS_HOME/ObjectGrid/dynacache/etc/dynacache-remote-objectgrid.xml  \
          -deploymentPolicyFile $WXS_HOME/ObjectGrid/dynacache/etc/dynacache-remote-deployment.xml  \
          -catalogServiceEndPoints MyCatalogServer:2809 

  5. Log on to the console and go to...

    Servers | WebSphere application servers | server1 | Container Services | Container Settings | Dynamic cache service

  6. Set Cache provider to WebSphere eXtreme Scale

    Verify Enable cache replication is set to true.

  7. Go to...

    WASs | server1 | Java and Process Management | Server Infrastructure | Process definition | Java Virtual Machine | Additional Properties | Custom properties

    ...and verify settings... false off off 0 true true

    Set to true to prevent recursive invalidations of dependency IDs. true

    Set to true to reduce the size of the data in the cache and reduce network traffic. true

    Set to true to indicate that the cache value should not be de-serialized for a change event. remote

    This is the most important property we need to set. We are using remote to signify that the cache data is stored outside of the WebSphere Commerce JVMs. Other potential values are local, embedded, and embedded_partitioned. true true ALL true true true 100000 true true

  8. Go to...

    System administration | WebSphere eXtreme Scale | Catalog service domains | New

  9. Enter Name for new catalog service domain, and set this domain as the default...

    Because our catalog server is running outside of the WebSphere Application server we...

    • Selected Remote Server
    • Entered the Remote Server hostname for the catalog service
    • Entered the Listener Port of 2809 (the default)

  10. Click OK and Save to create the new domain.

  11. Test the connection

  12. Cycle appserver

  13. Log file...


    ...should contain...

    CacheServiceI I DYNA1054I: Dynamic Cache (core cache) initialized successfully.
    ObjectCacheSe I DYNA1056I: Dynamic Cache (object cache) initialized successfully.
    CacheProvider I CWOBJ4500I: WebSphere eXtreme Scale Dynamic Cache provider is successfully initialized.
    ObjectGridImp I CWOBJ4700I: The map name IBM_DC_PARTITIONED_baseCache matched the regular expression of template map IBM_DC_PARTITIONED_.*. The IBM_DC_PARTITIONED_baseCache map has been created for ObjectGrid DYNACACHE_REMOTE.
    CacheProvider I CWOBJ4508I: The WebSphere eXtreme Scale provider has created a Dynamic Cache instance with name baseCache using topology remote.

  14. Validate map sizes by running...

    cd $WXS_HOME/ObjectGrid/bin
    ./ -mapsizes

    ...which should generate something like...

    Connecting to Catalog service at localhost:1099

    ** Displaying Results for...


    ** Listing Maps for container1

    Map Name Partition Map Size Used Bytes (KB) Shard Type
    IBM_DC_PARTITIONED_baseCache 0 2 656 AsynchronousReplica
    IBM_DC_PARTITIONED_baseCache 1 2 656 Primary
    IBM_DC_PARTITIONED_baseCache 2 2 656 Primary
    IBM_DC_PARTITIONED_baseCache 3 3 2 AsynchronousReplica
    IBM_DC_PARTITIONED_baseCache 41 3 3 AsynchronousReplica
    IBM_DC_PARTITIONED_baseCache 42 2 656 Primary

    Server Total: 105 (57KB)

    *** Listing Maps for container2 ***

    Map Name Partition Map Size Used Bytes (KB) Shard Type
    IBM_DC_PARTITIONED_baseCache 0 2 656 Primary
    IBM_DC_PARTITIONED_baseCache 1 2 656 AsynchronousReplica
    IBM_DC_PARTITIONED_baseCache 2 2 656 AsynchronousReplica
    IBM_DC_PARTITIONED_baseCache 3 3 2 Primary
    IBM_DC_PARTITIONED_baseCache 4 2 656 Primary
    IBM_DC_PARTITIONED_baseCache 5 3 2 AsynchronousReplica
    IBM_DC_PARTITIONED_baseCache 6 2 656 AsynchronousReplica
    IBM_DC_PARTITIONED_baseCache 41 3 3 Primary
    IBM_DC_PARTITIONED_baseCache 42 2 656 AsynchronousReplica
    IBM_DC_PARTITIONED_baseCache 43 2 656 AsynchronousReplica

    Server Total: 105 (57KB)
    Total Domain Count: 210 (114KB)

    Note that...

    1. The name of the grid and MapSet are both DYNACACHE_REMOTE. These are the default grid and MapSet names used by the WebSphere eXtreme Scale dynamic cache provider.

    2. The map name is IBM_DC_PARTITIONED_baseCache. This is the default map that is used for the base cache dynamic cache implementation.

    3. Both container servers are listed with an appropriate distribution of primary and asynchronous replicas.

    4. Partitions with map sizes greater than 2 contain dynamic cache specific content. Every partition will automatically include 2 entries used for management purposes as part of the dynamic cache implementation. Any additional entries represent application content in the dynamic cache.

    5. In WXS v7.1 (used in the sample) there is a bug in the xsadmin utility when displaying used bytes. Ideally entries should be presented in either bytes or kilobytes (KB) consistently. However, until all entries grow to a size greater than 1KB there is a mixture of byte and KB entries in the table. In the output above the entries with a bytes used count of 656 represent 656 bytes while those with bytes used count of 2 or 3 represent kilobytes used. As noted in the banner of the output this is an unsupported utility but we hope to have an ifix available soon to correct this issue.

    6. The total server size is presented for each container server. This size is correctly calculated and displayed in KB.

  15. You can also access the WXS web console...


    Default username/password is admin/admin

  16. Use cache monitor verify the Commerce application is being cached


See also

  1. WebSphere Commerce with WXS DynaCache