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.
- 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
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 your changes and close the file.
- Deploy the customized file to the production environment.
- In the WebSphere Commerce Search server WebSphere Application Server administrative console, go to .
-
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: You must update this value every time you update the session key on the WebSphere Commerce server.
For more information, see Configuring namespace bindings.
- Save your 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:
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. - Restart the WebSphere Commerce Search server.