Configuring the WebSphere Commerce and WebSphere Commerce Search server namespace bindings

After you deploy WebSphere Commerce Search, you must configure the namespace bindings to ensure that search requests are handled correctly. The WebSphere Commerce and WebSphere Commerce search servers use namespace bindings that are defined in the WebSphere Application Server administrative console. Instead of defining the server URL in the wc-search.xml file, you can specify a reference to the search URL name binding.

For example, in bold:

<_config:server name="AdvancedConfiguration_1">
        <_config:common-http
            allowCompression="true" connectionTimeout="15000"
            defaultMaxConnectionsPerHost="600" followRedirects="false"
            maxRetries="1" maxTotalConnections="600"
            reference="com.ibm.commerce.foundation.server.services.search.url"
            retryTimeInterval="1000" soTimeout="15000"/>
    </_config:server>
Note: If a reference is defined in the JNDI reference attribute, the search run time uses its value and ignores the URL attribute value.

Before you begin

Procedure

  1. In the WebSphere Commerce server WebSphere Application Server administrative console, go to Environments > Naming > Name space bindings.
  2. Set the following namespace bindings for the WebSphere Commerce server:
    Name Value
    com.ibm.commerce.foundation.server.services.search.hostname The WebSphere Commerce Search server host name.
    com.ibm.commerce.foundation.server.services.search.port The WebSphere Commerce Search server port. The default value is 3737.
    com.ibm.commerce.foundation.server.services.search.preview.port The WebSphere Commerce Search server preview port. The default value is 3738.
    com.ibm.commerce.foundation.server.services.search.url The WebSphere Commerce Search server URL. The default value is http://hostname:portnumber/solr.
  3. Set the following namespace bindings for the WebSphere Commerce Search server:
    Name Value
    com.ibm.commerce.foundation.server.services.commerce.hostname The WebSphere Commerce server host name.
    com.ibm.commerce.foundation.server.services.commerce.integration.password The WebSphere Commerce server password.
    com.ibm.commerce.foundation.server.services.commerce.integration.sessionkey The value of the SessionKey attribute from the wc-server.xml file.
    Important: You must update this value every time you update the session key on the WebSphere Commerce server.
    com.ibm.commerce.foundation.server.services.commerce.integration.username The WebSphere Commerce server user name.
    com.ibm.commerce.foundation.server.services.search.datasource The WebSphere Commerce Search server data source.
    com.ibm.commerce.foundation.server.services.search.hostname The WebSphere Commerce Search server host name. Required only when WebSphere Commerce search is deployed in the advanced configuration.
    com.ibm.commerce.foundation.server.services.search.url The WebSphere Commerce Search server URL. Required only when WebSphere Commerce search is deployed in the advanced configuration.

    For more information, see Configuring namespace bindings.

    The following list summarizes the passwords that are used for each server, and the location of where it is persisted:
    Production environment using a clustered configuration, on one of the managed nodes
    WebSphere Commerce JVM has Administrative security enabled only.
    WebSphere Commerce server stores the application security password of the search server. This password is used for the UpdateSearchIndex scheduler job to trigger the index building administrative task on the search server.
    WebSphere Commerce Search JVM has both Administrative security and Application security enabled.
    WebSphere Commerce Search server subordinate node in the production environment stores the application security password to access the Repeater. This password is used for index replication with the Repeater.
    Repeater in the Production environment
    The replication.csv file on the search server contains the application security password of each of the Solr nodes in the production environment. This password is used for monitoring replication status.
    When you run the di-buildindex utility from the command line, the application security password for the Repeater is passed in as a command line argument. When you perform indexing by using the UpdateSearchIndex scheduler command, the application security password for the Repeater is retrieved from the Name Space Binding stored on the WebSphere Commerce server under the com.ibm.commerce.foundation.server.services.search.application.security.password JNDI name.
    Note: To avoid conflicts in environments that contain a repeater, all search server's administrative user and passwords must be the same. Otherwise, in the production server, the storefront requires the production search server's administrative user name and password, while delta index updates for quick publish require the repeater's administrative user name and password.
    Staging or authoring environment
    When you run di-buildindex from the command line, the application security password for the search server is passed in as a command line argument. When you perform indexing by using the UpdateSearchIndex scheduler command, the application security password for the search server is retrieved from the Name Space Binding stored on the WebSphere Commerce server under the com.ibm.commerce.foundation.server.services.search.application.security.password JNDI name.
    When you initiate index replication from the Staging server by using indexprop, the application security password for the Repeater is retrieved from the replication.csv file on the WebSphere Commerce server.
  4. Save your changes.