How do I prevent cluster-replication of certain session attributes?

Disabling clustering for session attributes presumes the presence of a sticky load balancer (as the non-clustered attributes will be visible only to requests executing locally within that JVM).

  1. Implement the interface HttpSessionCollection.SessionDistributionController (in package com.tangosol.coherence.servlet, in the coherence-web.jar found in webInstaller.jar). The specific method of interest is isSessionAttributeDistributed().
  2. After the "inspect" phase of the Coherence*Web installation process, edit the coherence-web.xml that is generated. Specify the distribution controller:
    <context-param>
      <param-name>coherence-distributioncontroller-class</param-name>
      <param-value>com.company.MyDistributionController</param-value>
      <description>[COH33UG:...]</description>
    </context-param>
  3. Run the "install" phase as normal.