Implementing the business logic layer

The business logic layer contains the commands used in this tutorial. To save time, you are importing these commands directly from the provided tutorial code.

About this task

The design pattern for Get services is the basic design pattern used for retrieving and displaying information from Web services. This pattern uses the following requests and responses:
  • The Get request provides the search criteria that is used to retrieve the business objects along with paging options for paged requests. The search criteria is represented as a XPath expression.
  • The Show response includes the business objects that match the search criteria.
Note: The Get services use the InsertMoreData capability of the Get design pattern to include catalog entry information in the Recipe services. For more information, see Modifying a Get service to use business logic to insert more data for a specific access profile.

Complete the following steps to import the business logic layer commands.


  1. Import the business logic layer Java files into your Project-Server project:
    1. In the Enterprise Explorer view, expand Project-Server/ejbModule.
    2. Right-click com.mycompany.commerce.project.facade.server.commands; click Import.
    3. Expand General; select File System, then click Next.
    4. Browse to the temporary location where you extracted
    5. Browse to the com.mycompany.commerce.project.facade.server.commands folder; select the folder, then click Ok.
    6. Select all files in the folder; click Finish.
    7. Click Yes to All to overwrite any existing files.
  2. Register the new commands in the CMDREG table:
    1. Navigate to WCDE_installdir\samples\DataLoad.
    2. Create a folder that is called cmdreg and a subfolder called command in this directory.
    3. Browse to the temporary location where you extracted the file.
    4. Browse to the dataload folder and copy wc-dataload-env.xml into the cmdreg folder created previously.
    5. Copy the rest of the files in the dataload folder into the command subfolder created in step b.
    6. Apache Derby Stop the WebSphere Commerce test server.
    7. In a command prompt, navigate to WCDE_installdir\bin.
    8. Run the following command:
      Apache Derby
      dataload ..\samples\DataLoad\cmdreg\command\wc-dataload.xml
      dataload ..\samples\DataLoad\cmdreg\command\wc-dataload.xml development_db db_user db_password db_schema
      dataload ..\samples\DataLoad\cmdreg\command\wc-dataload.xml development_db db_user db_password
      Note: Data load is a utility that is provided by WebSphere Commerce to load an XML input file into a target database. For more information, see ../../