Tutorials > Program model > Modify an existing controller command

< Previous | Next >


Modify the command registry

In this step, we will modify the command registry so that the new MyOrderItemAddCmdImpl implementation class gets used instead of the original OrderItemAddCmdImpl implementation class. The only table in the command registry that needs to be modified is the CMDREG table. In this case, the new implementation class is used for all stores.

To register MyNewControllerCmd in the CMDREG table:


Procedure

  1. Start the test environment.

  2. Open a browser and type the following URL: http://localhost/webapp/wcs/admin/servlet/db.jsp.

  3. Enter the following SQL statement:

    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.

< Previous | Next >


+

Search Tips   |   Advanced Search