Feature Pack 7 or later

Creating a custom project for search-related customizations

You can create and maintain a utility project under your workspace for all your search-related customizations.

Follow these steps to add your custom code into the search EAR class path:
Important: Be aware of the following restrictions when implementing search-related customizations on the WebSphere Commerce search server.

The search server does not have access to the following components:

  • BOD-based component services or SDO objects.
  • WebSphere Commerce task or controller commands.
  • WebSphere Commerce EJB, data beans, or access beans.
Business services must instead be provided from the WebSphere Commerce server through the REST interface, while business data must be retrieved using the Data Service Layer's JDBC query service.

For more information about the search server architecture, see WebSphere Commerce search interface.

For more information about the search compatibility paths when migrating from previous feature packs, see Migrating WebSphere Commerce search.

Procedure

  1. Create a new utility project under your workspace. For example, SearchServerExtensionsLogic.
    1. Select File > New > Other... > Java Project.
    2. Enter a project name, such as SearchServerExtensionsLogic and select Finish.
  2. Configure the class path of the new project to include the Search EAR JAR files.
    1. Right-click the newly created project and select Build Path > Configure Build Path.
    2. Select the Libraries tab.
    3. Click Add Library.
    4. Select User Library and click Next.
    5. Select User Libraries.
    6. Select New and enter a name. For example, Search. Click OK.
    7. Click Add External JARs and select all JAR files under the Search EAR. For example, all files under WCDE_installdir\workspace\Search.
    8. Click OK > Finish > OK.
  3. Add the SearchServerExtensionsLogic to the Search-Rest WAR utility projects.
    1. Select the J2EE view, if not already selected.
    2. Go to the following location: Search-Rest > WebContent > WEB-INF.
    3. Right click web.xml and select Open With > Web Application Deployment Descriptor Editor.
    4. Select Actions > Manage Utility Jars
    5. Click Add and select Project.
    6. Select the newly created project, for example, SearchServerExtensionsLogic, and click Finish.
    7. Click OK.
  4. Publish your test server and restart your search application