Tutorials > Sales Center > Add a new search option in the IBM Sales Center

< Previous


Deploy the changes

This sections explains how to deploy the changes you made in the previous steps.

Deploy the changes involves the following high-level steps:


Procedure

  1. Export the code for the client from the IBM Sales Center development environment.

  2. Export the code for the WebSphere Commerce Server from the WebSphere Commerce development environment.

  3. Install the client code on an IBM Sales Center client.

  4. Install the WebSphere Commerce Server code on a target server.


Export the code for the client from the IBM Sales Center development environment


Prepare the plug-in for packaging

Return to the client development environment and package the customized assets for deployment...

  1. Open the IBM Sales Center development environment if it is not already open.

  2. In the Package Explorer view, navigate to the myNewExtensionsPlugin project.

  3. In the myNewExtensionsPlugin project, locate the plugin.xml file. Double-click the file to open it for editing.

  4. Click the Build tab.

  5. In the Binary Build section of the Build Configuration editor, keep all default selections and select the config directory to include the config/config.ini file in the exported plug-in. The other assets are automatically included from the default build selections:

  6. Save the changes.


Create a feature project

  1. Click File > New > Feature Project.

  2. In the Project name field, enter newSearchOptionFeature.

  3. Click Next.

  4. In the Feature Properties window, in the Feature Provider field, enter MyCompany.

  5. Click Next.

  6. From the Referenced Plug-ins and Fragments list, select the myNewExtensionsPlugin.

  7. Click Finish. The feature.xml file opens for editing in the Feature Manifest editor.

  8. In the Feature URLs pane, right-click Update URLs and select New > Update URL as in the following screen capture:

  9. Click the Properties view:

    1. Set the Label property's value to New Search Option update site.

    2. Set the URL property's value to http://newSearchOptionURL. If we will host this update on a real update site, set this value to the server URL from which the updates can be found.

  10. Save the changes.


Create an update site project

  1. Click File > New > Other.

  2. Select Plug-in Development > Update Site Project.

  3. Click Next.

  4. In the Project name field, enter newSearchOptionUpdateSite and click Finish.

  5. In the site.xml editor, in the Features tab, click Add.

  6. From the Available Features list select newSearchOptionFeature (1.0.0) and click Finish.

  7. Select newSearchOptionFeature (1.0.0) and from its pop-up menu, select Publish as in the following screen capture:

  8. Click Build All.

  9. In the Package Explorer, hold down the Ctrl key and select both the newSearchOptionFeature project and the newSearchOptionUpdateSite project. Right-click and select Export.

  10. Select File System and click Next.

  11. In the To directory field, enter a directory on the file system, for example drive :/newSearchOptionExtension.

  12. Click Finish.


Export the code for the WebSphere Commerce Server from the WebSphere Commerce development environment

  1. Open WebSphere Commerce Developer if it is not already open.

  2. In the Java EE perspective, in the Enterprise Explorer view, navigate to Other Projects > WebSphereCommerceServerExtensionsLogic.

  3. Inside the WebSphereCommerceServerExtensionsLogic project, navigate to the com.mynewextensionsmfpartnumber package.

  4. From the com.mynewextensionsmfpartnumber package's pop-up menu, select Export.

  5. Select JAR file and click Next.

  6. In the JAR Package Specification window:

    1. Select Export generated class files and resources.

    2. Clear Export all output folders for checked projects.

    3. Clear Export java source files and resources.

    4. In the Jar file field enter a temporary directory for your exported code, for example, drive:/exportTemp/WebSphereCommerceServerExtensionsLogic.jar. The file name must be WebSphereCommerceServerExtensionsLogic.jar.

    5. Click Next.

  7. Click Finish.

  8. Copy the customized Telesales Registry file to the temporary directory.

    1. Navigate to WC_EAR/xml/messaging

    2. Copy the TelesalesRegistry-ext.xml file to drive:/exportTemp/


Update the WebSphere Commerce application


Transfer assets to the target WebSphere Commerce Server

In this step, we will create a temporary directory on the target WebSphere Commerce Server and then copy the customization assets into this directory. In subsequent steps, we will place the different types of code into the appropriate place within the WebSphere Commerce application.

To copy the files from the development machine to the target WebSphere Commerce Server:

  1. On the target WebSphere Commerce Server, create a temporary directory called drive:\ImportTemp.

  2. Determine how we will copy the files from one computer to another. You can do this by mapping a drive on the target WebSphere Commerce Server to the development machine, or by using an FTP application.

  3. From the development machine, copy the contents of drive:\ExportTemp into drive:\ImportTemp on the target WebSphere Commerce Server.


Stop the target WebSphere Commerce application

Open the WebSphere Application Server administration console and stop the WebSphere Commerce application:

  1. Open the WebSphere Application Server administrative console by entering the following URL in a Web browser: http:// host: portNumber/ibm/console , where host is the name of the target machine and portNumber is the port number used to access the Admin Console is defined during profile creation. The default port number is 9060.

  2. Click Applications > Enterprise Applications to see a list of installed applications.

  3. Select the WebSphere Commerce application, for example WC_demo, and click Stop.


Export a backup copy the EAR

Export a backup copy of the EAR, so that you can revert to the old version in the future if necessary:

  1. In the WebSphere Application Server administrative console, click Applications > Enterprise Applications to see a list of installed applications.

  2. Select the WebSphere Commerce application, for example WC_demo, and click Export.

  3. Follow the wizard and save the EAR file in a backup directory.


Update TelesalesRegistry-ext.xml file on the target WebSphere Commerce Server

Update the store with the modified store assets using the WebSphere Application Server administrative console:

  1. In the WebSphere Application Server administrative console, click Applications > Enterprise Applications.

  2. Select the application name, for example WC_demo, and click Update.

  3. Select Single File.

  4. In the Relative path to file field, enter xml\messaging\TelesalesRegistry-ext.xml.

  5. Select Local file system and specify the path to drive:\ImportTemp\TelesalesRegistry-ext.xml.

  6. Click Next.

  7. Click OK.

  8. When the update completes click Manage Applications. Leave the WebSphere Application Server administrative console open.


Update the command JAR file on the target WebSphere Commerce Server

In this section we will update the target WebSphere Commerce Server to use the new command JAR file,...

  1. In the WebSphere Application Server administrative console, select your application name, for example WC_demo, and click Update.

  2. Select Single File.

  3. In the Relative path to file field, enter WebSphereCommerceServerExtensionsLogic.jar.

  4. Select Local file system and specify the path to drive:\ImportTemp\WebSphereCommerceServerExtensionsLogic.jar.

  5. Click Next.

  6. Click OK.

  7. When the update completes successfully, click Save to Master Configuration.

  8. On the Enterprise Applications screen, click Save to save your changes to the master configuration.

Note: It is possible to update both the store assets and the WebSphereCommerceServerExtensionsLogic.jar in one partial application update. In this tutorial the updates are separated for clarity. However in a production environment it is likely more efficient to combine the two updates into one update.


Update the WebSphere Commerce configuration file

In WebSphere Commerce Developer, you made changes to the wc-server.xml file. You must make the same changes on the target machine in the WebSphere Commerce configuration file.

To update the WebSphere Commerce configuration file:

  1. Open the WebSphere Commerce configuration file in a text editor.

  2. Locate the following text:

    <property
            baseRegistryFileName="TelesalesRegistry.xml"
            baseRegistryFilePath="messaging"
            customRegistryFileName=""
            customRegistryPath=""
            display="false" enableBaseRegistryOverride="false" />
    

  3. Modify the preceeding text to include the new registry file and set enableBaseRegistryOverride property to true. Your text should match the following:

    <property
            baseRegistryFileName="TelesalesRegistry.xml"
            baseRegistryFilePath="messaging"
            customRegistryFileName="TelesalesRegistry-ext.xml"
            customRegistryPath="messaging"
            display="false" enableBaseRegistryOverride="true" />
    

  4. Save the changes.

  5. On the file system, navigate to WC_INSTALL /bin

  6. Run the following ANT task: WC_INSTALL /bin/config_ant -DinstanceName= instance UpdateEAR where instance is the name of the instance.


Start the target WebSphere Commerce application

Open the WebSphere Application Server administration console and stop the WebSphere Commerce application:

  1. In the WebSphere Application Server administrative console click Applications > Enterprise Applications to see a list of installed applications.

  2. Select the WebSphere Commerce application, for example WC_demo, and click Start.


Update the IBM Sales Center client

To apply the new search option code to the IBM Sales Center client:

  1. If the IBM Sales Center client is on a different machine than the directory to which you exported the newSearchOptionExtension, copy the newSearchOptionExtension directory to the machine that runs the IBM Sales Center client.

  2. Open the IBM Sales Center.

  3. From the Application menu, select Install. If you do not see the Install option, then open the Sales Center in administrator mode.

  4. In the Application Installations window, click Add Folder Location.

  5. Navigate to the folder that contains the newSearchOptionUpdateSite, for example drive :/newSearchOptionExtension/newSearchOptionUpdateSite.

  6. From the Location List, select only newSearchOptionExtension/newSearchOptionUpdateSite.

  7. If the Edit Locale window displays, click OK.

  8. In the Search Results window, select newSearchOptionFeature.

  9. Click Next.

  10. Select I accept the terms in the license agreements and click Next.

  11. Accept the default value and click Finish.

  12. Click Install.

  13. When prompted, restart the IBM Sales Center client.

  14. When the client restarts, select Application > Open > Sales Center - Order Management.

  15. Click File > Logon and connect to the WebSphere Commerce Server.

  16. Test the new search term as described in Test the completed tutorial.

< Previous


+

Search Tips   |   Advanced Search