Modify the command registry to register your new class

In this lesson, you modify the HCL Commerce command registry to register your new MyOrderItemAddCmdImpl implementation class and to ensure that your class is used instead of the default OrderItemAddCmdImpl implementation class. When you register your new class, your class is used as the implementation class for all stores.

Procedure

  1. Start or restart the HCL Commerce Test Server.
  2. Open a connection to your database.
  3. Run the following SQL statement to update the CMDREG to register your new MyNewControllerCmd controller command. :
    
    update CMDREG set CLASSNAME='com.ibm.commerce.sample.commands.MyOrderItemAddCmdImpl'
    WHERE INTERFACENAME='com.ibm.commerce.orderitems.commands.OrderItemAddCmd' and storeent_Id=0;
    
  4. Click Submit Query to run the SQL statement.