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:
- 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.
- Use 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.
- Use 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 we are using only BOD services.
In this mode, the com.ibm.commerce.foundation.internal.server.services.context.RemoteContextServiceImpl is used.
Before beginning
Ensure that you complete the following tasks:
Procedure
- Open the Search_eardir/properties/com/ibm/commerce/foundation/server/services/context/RemoteContextServiceFactory.properties file for editing.
- Find the following line:
com.ibm.commerce.foundation.server.services.rest.search.context.SolrRESTSearchRemoteContextServiceImpl
- Replace it with the following line:
com.ibm.commerce.foundation.server.services.rest.search.context.SolrRESTSearchMixedContextServiceImpl
- Save our changes and close the file.
- In the WebSphere Commerce Search server WebSphere Application Server administrative console, go to Environments > Naming > Name space bindings.
- Select the scope for each WebSphere Commerce Search server from the list. For example, Node=demo_search_node, Server=solrServer.
- 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.
- Save our changes.
- 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.
- Restart the WebSphere Commerce Search server.