Disable the remote Business Context Service (BCS) call

We can disable the remote BCS call to avoid deadlock issues during searches in the storefront.

When catalog filter and REST services entitlement checks are enabled, the remote BCS call can be used to validate contracts based on the current runAsId. The BCS call then triggers a REST call to WebSphere Commerce. We can also use local contract validation on the search server. The following list summarizes the Business Context Service modes:


Before beginning

Ensure that you complete the following tasks:


Procedure

  1. Open the Search_eardir/properties/com/ibm/commerce/foundation/server/services/context/RemoteContextServiceFactory.properties file for editing.

  2. Find the following line:

      com.ibm.commerce.foundation.server.services.rest.search.context.SolrRESTSearchRemoteContextServiceImpl

  3. Replace it with the following line:

      com.ibm.commerce.foundation.server.services.rest.search.context.SolrRESTSearchMixedContextServiceImpl

  4. Save our changes and close the file.

  5. In the WebSphere Commerce Search server WebSphere Application Server administrative console, go to Environments > Naming > Name space bindings.

  6. Select the scope for each WebSphere Commerce Search server from the list. For example, Node=demo_search_node, Server=solrServer.

  7. Click New and create a String type namespace binding for the WebSphere Commerce Search server with the following values:

      Binding identifier
      com.ibm.commerce.foundation.server.services.commerce.integration.sessionkey

      Name
      com.ibm.commerce.foundation.server.services.commerce.integration.sessionkey

      String value
      Copy and paste the value of the SessionKey attribute from the wc-server.xml file into this field.Important: We must update this value every time you update the session key on the WebSphere Commerce server.

    See Configure namespace bindings.

  8. Save our changes.

  9. Ensure that the following properties in the com.ibm.commerce.foundation/wc-component.xml file on the WebSphere Commerce Search server contain the same values with the corresponding configurations in the wc-server.xml file on the WebSphere Commerce server:

    Search server
    (com.ibm.commerce.foundation/wc-component.xml)
    WebSphere Commerce server
    (wc-server.xml)
    Default setting on both servers
    CommerceServerSetting/SessionManagement/allowMultipleLogonForSameUser SessionManagement/AllowMultipleLogonForSameUser/enable false
    LoginTimeout/Timeout/buffer LoginTimeout/Timeout/buffer LoginTimeout/Timeout/value-60000
    LoginTimeout/Timeout/value LoginTimeout/Timeout/value 1800000
    CommerceServerSetting/SessionManagement/cookie/domain SessionManagement/cookie/domain ""
    CommerceServerSetting/SessionManagement/cookie/path SessionManagement/cookie/path "/"
    CommerceServerSetting/SessionManagement/keepAliveSessionEnabled MemberSubSystem/Directory/keepAliveSession true
    CommerceServerSetting/SessionManagement/PersistentSession/enable SessionManagement/PersistentSession/enable true
    CommerceServerSetting/SessionManagement/PersistentSession/cookieExpiry SessionManagement/PersistentSession/cookieExpiry -1
    CommerceServerSetting/SessionManagement/Security/multiHashEnabled Security/multipleHashAlgorithmEnabled false
    CommerceServerSetting/SessionManagement/Security/AESDBEnabled Security/AES_DB false
    CommerceServerSetting/SessionManagement/Security/AESFilesEnabled Security/AES_Files false
    HashAlgorithmPriorities Security/HashAlgorithm These fields are unrelated, since multiple hash algorithms are set to false.

  10. Restart the WebSphere Commerce Search server.