Migrating WebSphere Commerce Version 8 command and data bean projects

Migrating command and data bean projects involves several steps. The WebSphereCommerceServerExtensionsLogic project must be exported from our old development environment, and imported into the WebSphere Commerce Version 9 development environment.


Task info

Custom extension logic code from the WebSphereCommerceServerExtensionsLogic project must be exported from the WebSphere Commerce Version 8 development environment as a JAR file named WebSphereCommerceServerExtensionsLogic.jar. The JAR file is then imported as compressed file under the WebSphere Commerce Version 9 development environment within Java EE perspective > Other Projects > WebSphereCommerceServerExtensionsLogic > src.

Note: Other custom projects must be exported and imported following the instructions in step 3.


Procedure

  1. Export the Java project from our old development environment as a JAR file by using Rational Application Developer.

    1. Open the WebSphere Commerce Version 8 development environment workspace and open the J2EE perspective.

    2. Select the project that contains our customized code. Right-click, then select Export > Java > Jar file.

    3. Click Next.

    4. In the list of resources under Select the resources to export, ensure that your project is selected.

    5. Ensure Export generated class files and resources and Export java source files and resources are selected.

    6. Click Browse and choose a path to save the exported archive file.

    7. Ensure Compress the contents of the file is selected.

    8. Click Finish to complete the export.

  2. Import the Java project by using Rational Application Developer functions within the WebSphere Commerce Version 9 development environment.

    1. Open the WebSphere Commerce Version 9 development environment workspace and open the Java EE perspective.

    2. Select Java EE perspective > Other Projects > WebSphereCommerceServerExtensionsLogic > src

    3. Right-click the target project and click Import.

    4. Select General > Archive file, and then click Next.

    5. Click Browse to find the file we want to import. Notes:

      1. The class path for each custom project must be updated to resolve the dependencies on libraries and between projects.

      2. Do not import any of the metadata, or your migration fails. Metadata includes the following files:

        • .setting

          • org.eclipse.wst.common.component

          • org.eclipse.wst.common.project.facet.core.xml.factorypath

        • .project

        • .classpath

        • META-INF/

    6. If we are asked to overwrite any files, select Yes for each file.

    7. Click Finish.

  3. If the project we want to import doesn't exist in the WebSphere Commerce Version 9 development workspace, then follow these steps to import the entire command or data bean projects from previous versions of WebSphere Commerce Developer:

    1. Open our old WebSphere Commerce Version 8 development environment workspace and open the J2EE perspective.

    2. Select the project that contains our customized code. Right-click and select Export.

    3. Select General > Archive file, and then click Next.

    4. In the list of resources under Select the resources to export, ensure that your project is selected.

    5. Ensure the Create only selected directories and Compress the contents of the file options are selected.

    6. Click Browse and choose a path to save the exported compressed file.

    7. Click Finish to complete the exporting.

    8. Optional: If the WebSphere Commerce Version 8 development environment and the WebSphere Commerce Version 9 development environment are on separate workstations, copy the compressed file to the WebSphere Commerce Version 9 development environment.

    9. Open the WebSphere Commerce Version 9 development environment workspace and open the Java EE perspective.

    10. Select File > Import > Existing Projects into Workspace.

    11. Click Browse to find the file you exported.

    12. Click Finish.

    13. A Workspace Migration Wizard is shown. Follow the instructions in the wizard to complete the migration.

  4. Correct any compilation errors and rebuild the project.

Previous topic: Migrate our custom Physical Service Data Objects.
Next topic: Migrate your Watson Content Hub integration.