Feature Pack 7 or later

Disabling the remote Business Context Service (BCS) call

You 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. You can also use local contract validation on the search server.

The following list summarizes the Business Context Service modes:
  • Recommended: Using the Local Business Context on the search server. where users are authenticated locally, and all other contextual information is directly retrieved from the database.

    In this mode, the com.ibm.commerce.foundation.server.services.rest.search.context.SolrRESTSearchMixedContextServiceImpl is used, which is performed in this task.

  • Using the Remote Business Context on the search server, where all contextual information is retrieved by issuing a REST call to WebSphere Commerce. This mode is not recommended, due to the risk of thread pool contention.

    In this mode, the com.ibm.commerce.foundation.server.services.rest.search.context.SolrRESTSearchRemoteContextServiceImpl is used, which is replaced in this task.

  • Using component services on the WebSphere Commerce server, also known as the compatible mode for migrated environments that do not use a REST-based search deployment. This mode is required if you are using only BOD services.

    In this mode, the com.ibm.commerce.foundation.internal.server.services.context.RemoteContextServiceImpl is used.

Before you begin

Ensure that you install the following APAR:

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 your changes and close the file.
  5. Deploy the customized file to the production environment.
  6. In the WebSphere Commerce search server WebSphere Application Server administrative console, go to Environments > Naming > Name space bindings.
  7. Select the scope for each WebSphere Commerce search server from the list.
    For example, Node=demo_search_node, Server=solrServer.
  8. 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: You must update this value every time you update the session key on the WebSphere Commerce server.

    For more information, see Configuring namespace bindings.

  9. Save your changes.
  10. 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:

    Property values to synchronize

    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.
  11. Restart the WebSphere Commerce search server.