You can load the completed code into WebSphere
Commerce Developer instead of completing each step in the tutorial.
Loading the code consists of the following high-level steps: Updating
the command registry on the target WebSphere Commerce Server; and
Validating the new logic on the target WebSphere Commerce Server.
About this task
This step uses controllercmd_completedsource.zip found in
the WCSample.zip file.
Procedure
- Updating the database in WebSphere Commerce Developer.
In this step, you will modify the command registry so that it will
use your new MyOrderItemAddCmdImpl implementation class. To register
MyNewControllerCmd in the CMDREG table:
- Start
the test environment.
- Open a browser and type the following URL:
http://localhost/webapp/wcs/admin/servlet/db.jsp.
- 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;
- Click Submit Query to run the
SQL statement.
- Load the JAR file that contains the new MyOrderItemAddCmdImpl
into WebSphere Commerce Developer:
- Select the WebSphereCommerceServerExtensionsLogic/src directory,
and from its pop-up menu, select Import.
- Select Zip file and click Next.
- In the From zip file text box,
enter or browse to the location of controllercmd_completedsource.zip
- Deselect MyNewErrorMessages.properties
- Click Finish.
- Import the message properties file to WebSphere Commerce
Developer. Properties files contain the text that displays in the
Web browser and in log files. Add the new message properties file
to WebSphere Commerce Developer:
- In the Enterprise Explorer view,
navigate to where Consumer_Direct_Name is the name of your consumer direct sample store.
- From the Consumer_Direct_name folder's
pop-up menu, select Import.
- Select Zip file and click Next.
- In the From zip file text box,
enter or browse to the location of controllercmd_completedsource.zip.
- Click Deselect All.
- Click MyNewErrorMessages.properties and
click Finish.
- Verifying the MyOrderItemAddCmdImpl logic in WebSphere
Commerce Developer