Deploying your customized code
This section refers to deploying your customized
code.
Before you begin
About this task
Once you complete and test the customization, you are ready to deploy your custom code to a target WebSphere Commerce Server to make the new function available to your business users. Deploying to the server involves exporting code from the WebSphere Commerce development environment and deploying code into the target WebSphere Commerce Server.
Since this scenario follows the scenario in Tutorial: Adding fields in the Catalogs tool, you can choose to complete the deployment together after completing these two tutorials or you can deploy them separately, in sequence. To reduce the deployment time and downtime of a production site, it is recommended that you complete one single deployment.
Procedure
- Export the LOBTools project:
- In the Enterprise Explorer view, expand
- Right-click LOBTools and select .
- Click Browse to select a destination.
- Click Finish.
- Optional: If you have not already deployed
either Tutorial: Extending a BOD service to manage UserData with the Data Service layer or Tutorial: Adding fields in the Catalogs tool, export the WebSphereCommerceServerExtensionsLogic
project:
- To export the data service layer (DSL) extension configuration
files, copy the XML configuration files to the directory that you
are using to build your deployment package:
- Deploying code into the target WebSphere Commerce Server.
In this step, you create a temporary directory on the target WebSphere
Commerce Server, and then copy your export assets into this directory
- In the WebSphere Application Server, select administrative console. Navigate to .
- In the Application Name field, specify the name of the application, for example, WC_demo, and click Update.
- Select Single module and change the specified path to your path.
- Click Next.
- In the next page, do not make any changes and click Next.
- Click Continue on the following page.
- To map the module to the server, select the Module, press Ctrl, select the Clusters and Servers that are running your WebSphere Commerce application, and then click Apply.
- Select Virtual host.
- Click Next, and then click OK.
- To deploy the WebSphereCommerceServerExtensionsLogic.jar
file and the XML configuration files:
- Package the WebSphereCommerceServerExtensionsLogic.jar file and the xml directory into a zip file. For example, partialApp.zip.
- In the WebSphere Application Server administrative console, select .
- In the Application Name field, specify the name of the application, for example, WC_demo, and click Update.
- Select Partial Application.
- In the Upload the archive file with the new or replacement files section, select Local file system, click Browse, and then specify the path to the drive:\ImportTemp\partialApp.zip file.
- Click Next.
- Click OK.
- Save the changes:
- Click Save to Master Configuration. The WebSphere Commerce application will restart. Your changes will be applied.
- Click Save.
Results
In this tutorial, you have customized:
- Management Center user interface files to add new sections with extended properties in the Advanced Search dialog and Catalog Search Result list view
- Controller JSP files to transfer extended query parameters from the user interface to the search template in the expression builder
- The wc-component.xml and get-data-config.xml configuration files to extend the search template in the expression builder to handle the search with more conditions