Front cover Draft Document for Review July 28, 2004 7:33 pm SG24-6320-00 Keeping Commerce ce Applications Updated dated WebSphere Commerce 5.1 to 5.6 Migration Guide Migration Strategy and Planning Production and Development Environments Step-by-Step Instructions Hernan Cunico Andrew Hays Steve Insley Khurram Wyne Nicolai Nielsen Sanjeev Sharma Sanjay Shah Drake Philbrook ibm.
Draft Document for Review July 28, 2004 7:33 pm 6320edno.fm International Technical Support Organization Keeping Commerce Applications Updated WebSphere Commerce 5.1 to 5.
6320edno.fm Draft Document for Review July 28, 2004 7:33 pm Note: Before using this information and the product it supports, read the information in “Notices” on page xi. First Edition (July 2004) This edition applies to Version 5, Release 6, Modification 0 of WebSphere Commerce. This document created or updated on July 28, 2004. © Copyright International Business Machines Corporation 2004. All rights reserved. Note to U.S.
Draft Document for Review July 28, 2004 7:33 pm 6320TOC.fm Contents Notices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xi Trademarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xii Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiii The team that wrote this redbook. . . . . . . . . . . . . . . . . . . . . . . . . .
320TOC.fm Draft Document for Review July 28, 2004 7:33 pm 2.6.2 WebSphere Commerce Payments . . . . . . . . . . . . . . . . . . . . . . . . . . 27 2.6.3 Configuration Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 2.6.4 Loader Package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 2.6.5 Password Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 2.6.6 Adaptor for CrossWorld. . . . . . . . . . . . . .
Draft Document for Review July 28, 2004 7:33 pm 6320TOC.fm 4.2.3 Database tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 4.3 Catalog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 4.4 Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 Part 2. Development environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6320TOC.fm Draft Document for Review July 28, 2004 7:33 pm Chapter 7. Migrating the development environment . . . . . . . . . . . . . . . . 111 7.1 Current development environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112 7.2 Development environment migrated . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112 7.3 Migrating the development instance . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113 7.3.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Draft Document for Review July 28, 2004 7:33 pm 6320TOC.fm 9.3.2 Create test instance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173 9.3.3 Removing test instances . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177 Chapter 10. Pre-migration steps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183 10.1 Preparation overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184 10.2 Instance preparation . . . . . . . .
6320TOC.fm Draft Document for Review July 28, 2004 7:33 pm 12.2.1 Deploying EJBs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231 12.2.2 Deploying commands and databeans . . . . . . . . . . . . . . . . . . . . . . 233 12.2.3 Deploying store assets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234 Part 4. Appendixes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237 Appendix A.
Draft Document for Review July 28, 2004 7:33 pm 6320TOC.fm Appendix D. Moving from single to multi-node environment . . . . . . . . . 267 Single-node environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 268 Installing and configuring the database node. . . . . . . . . . . . . . . . . . . . . . . . . 268 Create a Windows user for DB2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 268 Installing DB2 . . . . . . . . . . . . . . . . . . . . . . . . . . .
6320TOC.fm x Draft Document for Review July 28, 2004 7:33 pm Keeping Commerce Applications Updated WebSphere Commerce 5.1 to 5.
Draft Document for Review July 28, 2004 7:33 pm 6320spec.fm Notices This information was developed for products and services offered in the U.S.A. IBM may not offer the products, services, or features discussed in this document in other countries. Consult your local IBM representative for information on the products and services currently available in your area.
6320spec.fm Draft Document for Review July 28, 2004 7:33 pm Trademarks The following terms are trademarks of the International Business Machines Corporation in the United States, other countries, or both: AFP™ Approach® Cloudscape™ CrossWorlds® DB2 Universal Database™ DB2® Domino® Eserver® eServer™ ibm.
Draft Document for Review July 28, 2004 7:33 pm 6320pref.fm Preface This redbook is based on our experience migrating a customer application. Carrot Bunch Companies, Inc is the customer that provided the application, Chapter 4, “Commerce Application used during the migration” on page 55 covers the details of the application, runtime used, hardware specification and degree of customization.
6320pref.fm Draft Document for Review July 28, 2004 7:33 pm Hernan Cunico is an Senior I/T Specialist, WebSphere Specialist at the IBM International Technical Support Organization (ITSO), Raleigh Center. He has nine years of experience in Information Technology and e-business consulting. Hernan has written extensively on WebSphere Commerce and Application Server. His areas of expertise include networking, Internet security, e-business and e-commerce solutions architecture.
Draft Document for Review July 28, 2004 7:33 pm 6320pref.fm architecting, developing and implementing Enterprise B2C and B2B e-Commerce solutions. He has over five years experience in Product Integration, Information Technology and e-business consulting. Sanjay is skilled in providing infrastructure support, e-commerce solutions, application development and formal document writing. Drake Philbrook is the Vice President of WebSphere Commerce Practice for Shared Vision Group.
6320pref.fm Draft Document for Review July 28, 2004 7:33 pm Use the online Contact us review redbook form found at: ibm.com/redbooks Send your comments in an Internet note to: redbook@us.ibm.com Mail your comments to: IBM Corporation, International Technical Support Organization Dept. HZ8 Building 662 P.O. Box 12195 Research Triangle Park, NC 27709-2195 xvi Keeping Commerce Applications Updated WebSphere Commerce 5.1 to 5.
Draft Document for Review July 28, 2004 7:33 pm 6320p01.fm Part 1 Part 1 Introduction to WebSphere Commerce V5.6 © Copyright IBM Corp. 2004. All rights reserved.
6320p01.fm 2 Draft Document for Review July 28, 2004 7:33 pm Keeping Commerce Applications Updated WebSphere Commerce 5.1 to 5.
Draft Document for Review July 28, 2004 7:33 pm 6320ch_intro.fm 1 Chapter 1. Introduction This book describes all the necessary steps needed to successfully migrate a WebSphere Commerce Suite V5.1 application to WebSphere Commerce V5.6 on the Microsoft Windows 2000 platform. This book covers both production and development environments. © Copyright IBM Corp. 2004. All rights reserved.
6320ch_intro.fm Draft Document for Review July 28, 2004 7:33 pm 1.1 Overview Migrating complex applications as WebSphere Commerce always demands a lot of effort and preparation. In this book we used a WebSphere Commerce Suite V5.1 customer application as the starting point, a sample site, for the version-to-version migration scenario. This book covers all the steps we followed to migrate that application as well as the development environment from WebSphere Commerce Suite V5.1 to WebSphere Commerce V5.6.
6320ch_intro.fm Draft Document for Review July 28, 2004 7:33 pm Chapter 4, “Commerce Application used during the migration” Part 2, “Development environment” Part 2 of the book provides all the necessary steps to perform the development environment migration.
6320ch_intro.fm 6 Draft Document for Review July 28, 2004 7:33 pm Keeping Commerce Applications Updated WebSphere Commerce 5.1 to 5.
Draft Document for Review July 28, 2004 7:33 pm 6320ch_sum_of_changes.fm 2 Chapter 2. WebSphere Commerce V5.6 Overview This chapter provides an overview of WebSphere Commerce V5.6. Sections include an overview of the product, tools used to manage a site or store, and a description of the business and data models.
6320ch_sum_of_changes.fm Draft Document for Review July 28, 2004 7:33 pm 2.1 Product overview WebSphere Commerce V5.6 provides you with all the functionality that is needed to have a fully functional e-commerce site. It runs on industry leading products like DB2 and WebSphere Application Server. It is designed for security, scalability and performance that any e-commerce site demands. It comes pre-packaged with all the software required to have a fully functional e-commerce site.
Draft Document for Review July 28, 2004 7:33 pm 6320ch_sum_of_changes.fm The subsystems and server runtime operate within an interaction engine that provides all of the components with the necessary business context. These are governed by the contextual frameworks such as policies, entitlement, stores, personalization, and globalization. Administration tools The administration tools are used to configure and manage the WebSphere Commerce site and store operations.
6320ch_sum_of_changes.
6320ch_sum_of_changes.fm Draft Document for Review July 28, 2004 7:33 pm Web server WebSphere Application Server Database Server WebSphere Commerce Server WebSphere Commerce Payments Server Note: The WebSphere Commerce node architecture depicted in Figure 2-1 on page 10 shows a single-node configuration. The software components listed in this section can be distributed on separate nodes for scalability and security reasons. 2.2.
6320ch_sum_of_changes.fm Draft Document for Review July 28, 2004 7:33 pm WebSphere Application Server now uses a web based interface which can be accessed at http://:9090/admin by default. You must have application server named “server1” running to access this interface. You will also notice that WebSphere Application Server no longer requires a database or a web server to be installed. 2.2.3 Database Server DB2 Universal Database V8.1.5 is included with WebSphere Commerce V5.6.
6320ch_sum_of_changes.fm Draft Document for Review July 28, 2004 7:33 pm 2.2.5 WebSphere Commerce Payments Server The WebSphere Commerce Payments Server is a WebSphere enterprise application that runs on its own application server within the WebSphere Application Server. After installation, the WebSphere Commerce Payments instance must be created using the Configuration Manager.
6320ch_sum_of_changes.fm Draft Document for Review July 28, 2004 7:33 pm Outbound messaging support includes WebSphere MQ, WebSphere InterChange Server (ICS), e-mail, and file adapters. WebSphere Commerce ships with a sample J2C-based connector that can be customized. Collaboration Customer Care, which is a Lotus Sametime application integrated with WebSphere Commerce, provides live help in real time between customers and customer service representatives (CSRs).
6320ch_sum_of_changes.fm Draft Document for Review July 28, 2004 7:33 pm 2.3 WebSphere Commerce Server subsystems The WebSphere Commerce subsystems provide the database information model of a store. The information model differs from the data model in that in the data model each entity represents a table while in the information model any of the objects depicted may be mapped to the same database table, or a single object may map to several database tables.
6320ch_sum_of_changes.fm 1 Draft Document for Review July 28, 2004 7:33 pm WebSphere Commerce Customer WebSphere Commerce instance database Customer Service Representative MQ Applications 2 MQ 3a 3 3b LDAP 4 JNDI LDAP API LDAP Directory Management Tool 3c Mass Loader Directory Applications Legacy DB LDIF Mass Import Files Figure 2-2 User registration and update methods 1. WebSphere Commerce online registration This involves the registration of members online for the e-commerce Web site.
6320ch_sum_of_changes.fm Draft Document for Review July 28, 2004 7:33 pm 4. Using WebSphere Commerce Loader Package (MassLoad) WebSphere Commerce Loader Package is used for mass database updates. The MassLoad tool can be used for mass registration of users. This method is especially useful in the migration from previous versions, in database management, and in member registration exchange across WebSphere Commerce systems.
6320ch_sum_of_changes.fm Draft Document for Review July 28, 2004 7:33 pm An access control policy authorizes a group of users to perform particular actions on a group of WebSphere Commerce resources. Unless authorized through one or more access control policies, users have no access to any functions. Access control policies grant authorization to a specific group of users to perform particular actions on resources in a specified resource group.
6320ch_sum_of_changes.fm Draft Document for Review July 28, 2004 7:33 pm non-secure session cookies, which are used to manage the session data, and secure authentication cookies used to manage authentication data. Single sign-on WebSphere Commerce supports single sign-on when configured with an LDAP directory. 2.3.2 Catalog subsystem The Catalog subsystem provides online catalog navigation, merchandising features, interest lists, and search capabilities.
6320ch_sum_of_changes.fm Draft Document for Review July 28, 2004 7:33 pm 2.3.3 Trading subsystem The Trading subsystem in WebSphere Commerce provides the logic, function and data relevant for negotiating the price and quantity of a product or set of products between the buyer and seller organization. For the Professional Edition, the trading subsystem includes auctions.
6320ch_sum_of_changes.fm Draft Document for Review July 28, 2004 7:33 pm 2.3.8 Messaging subsystem The Messaging system provides WebSphere Commerce with the ability to communicate externally. This communication includes sending messages to and receiving messages from back-end systems or external systems, as well as sending notification to customers and administrators that events have occurred within WebSphere Commerce.
6320ch_sum_of_changes.fm Draft Document for Review July 28, 2004 7:33 pm Organization Administration Console The Organization Administration Console is used to administer users, groups, organizations, approvals, stores (if multiple stores are allowed by your business model) and associated security elements. The Organization Administration Console is a browser based tool.
Draft Document for Review July 28, 2004 7:33 pm 6320ch_sum_of_changes.fm to support business requirements and scenarios. A business model is packaged in a composite store archive file format (SAR) and is deployed by publishing that SAR file using the Administration Console. The business processes within each business model are grouped into three areas: Administrative processes: Administrative processes are those processes that are used to administer a site, a store, or an organization.
6320ch_sum_of_changes.fm Draft Document for Review July 28, 2004 7:33 pm In this model, the business can be a retailer, a manufacturer, or any other business that sells goods or provides services directly to consumers. B2B direct The B2B direct model supports commerce transactions between two businesses or parties. The transactions may involve products, services, or information exchange. In the B2B direct model, customers may be business buyers, resellers, distributors, or trading partners.
6320ch_sum_of_changes.fm Draft Document for Review July 28, 2004 7:33 pm The following are some examples of some of the demand chains supported by WebSphere Commerce. Buyers, resellers, and manufacturers Buyers purchase goods from a manufacturer’s resellers. Resellers, in turn, obtain the goods from the manufacturer, via the manufacturer’s hub. The resellers may be hosted by the manufacturer, or the resellers may be remote.
6320ch_sum_of_changes.fm Draft Document for Review July 28, 2004 7:33 pm Ex-Site An Extended Site, or Ex-Site, is a business-to-business Web site that provides a richly featured site where the selling organization can set up different storefronts to target each of their business customers. When a business customer enters the Ex-Site storefront, any discounts, product configurations, and special instructions particular to that customer are displayed.
6320ch_sum_of_changes.fm Draft Document for Review July 28, 2004 7:33 pm For Web applications, the JSP level changed from 1.1 to 1.2 while the Servlet level remains at 2.3. The level of the Java 2 platform that is supported has changed from 1.2 to 1.3 2.6.2 WebSphere Commerce Payments Formerly known as Payment Manager, WebSphere Commerce Payments was integrated with WebSphere Commerce V5.5 to facilitate and automate online payment processing.
6320ch_sum_of_changes.fm Draft Document for Review July 28, 2004 7:33 pm 2.6.6 Adaptor for CrossWorld The adapter for CrossWorlds, introduced in WebSphere Commerce Suite V5.4, offers a new mechanism to extend WebSphere Commerce business integration with the InterChange Server (ICS). 2.6.7 Catalog and product management Catalog and product management tools provide online catalog navigation, merchandising features, interest lists and search capabilities.
6320ch_sum_of_changes.fm Draft Document for Review July 28, 2004 7:33 pm Packages and bundles are groupings of catalog entries used for promotional purposes. – A bundle is a collection of catalog entries that allow customers to buy multiple items with one click. If you select a bundle, the bundle must be decomposed into separate orderable SKUs that are added individually to the shopping cart before you can check it out. The bundle's price is the aggregate of the prices of all the bundle components.
6320ch_sum_of_changes.fm Draft Document for Review July 28, 2004 7:33 pm The Product Management tooling The Product Management tooling in WebSphere Commerce Accelerator allows you to update your catalog merchandise information directly. It also allows you to create bundles, dynamic kits and pre-built kits. 2.6.8 Business Models Where as WebSphere Commerce 5.
6320ch_sum_of_changes.fm Draft Document for Review July 28, 2004 7:33 pm 2.6.11 Campaigns and Promotions New changes have been implemented in WebSphere Commerce V5.6 for campaigns and promotions. For example managing promotions where Blaze Advisor is no longer necessary. Promotions redesigned: The promotions system has been completely redesigned. It now provides support for redemption limits and promotion codes. Any promotion type may be distributed as a coupon.
6320ch_sum_of_changes.fm Draft Document for Review July 28, 2004 7:33 pm Refund: In order to appease a customer not satisfied with their purchase, the merchant or seller can offer a refund. Overridable system settings controls whether certain items are refundable. Return Merchandise Authorization (RMA): A RMA may be issued through a self-service interface or with the assistance of a Customer Service Representative (CSR). 2.6.
Draft Document for Review July 28, 2004 7:33 pm 6320ch_sum_of_changes.fm 2.6.15 Caching Server-side caching improves response time and reduces system load thus boosting performance and reducing infrastructure costs. The WebSphere Commerce servlet and page caching is now part of the WebSphere Application Server dynamic caching infrastructure (Dynacache). Dynacache WebSphere Application Server offers a built-in dynamic cache service for serving dynamic content and caching data.
6320ch_sum_of_changes.fm Draft Document for Review July 28, 2004 7:33 pm multiple users or pages. Fragments should be stable over a long enough period of time for meaningful reuse to occur. The goal of fragment caching with DynaCache is to maximize fragment reusability and cache utilization by breaking a page into smaller and simpler page fragments. This makes any caching, even a highly dynamic page, possible.
Draft Document for Review July 28, 2004 7:33 pm 6320ch_sum_of_changes.fm 2.6.16 Product Advisor The Product Advisor creates an interactive online product catalog that provides customers with different ways of finding what they want, using shopping metaphors. WebSphere Commerce 5.4 introduced Product Advisor Administration user interface, which included four metaphors to help customer compare products, explore products and provide guidance in making appropriate selection. Chapter 2. WebSphere Commerce V5.
6320ch_sum_of_changes.fm 36 Draft Document for Review July 28, 2004 7:33 pm Keeping Commerce Applications Updated WebSphere Commerce 5.1 to 5.
Draft Document for Review July 28, 2004 7:33 pm 6320ch_planning.fm 3 Chapter 3. Migration Strategy and Planning This chapter provides an overview of the migration process and discusses the initial stages of planning that are involved in choosing the appropriate migration approach. This chapter also includes the skills needed to complete migration. Hardware and software requirements are also defined.
6320ch_planning.fm Draft Document for Review July 28, 2004 7:33 pm 3.1 Migration Strategy considerations Migration to WebSphere Commerce 5.6 is a complex undertaking. Regardless of the migration approach you choose, it will require a significant investment in time and resources. It will often be cost effective to include any pending site redesign or feature addition projects along with your migration effort. Here are some of the factors to consider. 3.1.
6320ch_planning.fm Draft Document for Review July 28, 2004 7:33 pm 3.1.4 External product and user management If you manage your persistent data externally, then there may be little benefit derived from performing a migration. Some examples may include: Third-party or custom catalog management systems LDAP authentication Order status and history retrieved on-demand from an external source 3.1.
6320ch_planning.fm Draft Document for Review July 28, 2004 7:33 pm 3.2 Migration Planning WebSphere Commerce integrates with several other software products to provide award winning e-commerce solutions. Migrating WebSphere Commerce can be a complex and challenging task given the number of products and subsystems involved.
6320ch_planning.fm Draft Document for Review July 28, 2004 7:33 pm 3.2.2 Hardware and software prerequisites The following sections represent the minimum requirements for hardware and software involved in the installation and configuration of both production and development environments. Important: After installing all the required software you must install WebSphere Commerce V5.6 Fixpack 1 required for migration. It can be downloaded from the following URL: http://www-306.ibm.
6320ch_planning.fm Draft Document for Review July 28, 2004 7:33 pm – A mouse or other pointing device. (optional) – A graphics-capable monitor with a color depth of at least 256 colors. – A CD-ROM drive Connectivity: A local area network (LAN) adapter that is supported by the TCP/IP protocol. Software prerequisites Ensure that any system on which you plan to run the WebSphere Commerce V5.
6320ch_planning.fm Draft Document for Review July 28, 2004 7:33 pm Development Environment Before installing WebSphere Commerce Developer, ensure your machine meets the following hardware and software prerequisites.
6320ch_planning.fm Draft Document for Review July 28, 2004 7:33 pm Note: Microsoft Windows Server 2003 is not supported for the WebSphere Commerce development environment. 3.3 Product versions mapping This section illustrates the product versions mapping we used in our scenario while migrating from WebSphere Commerce Suite V5.1 to WebSphere Commerce V5.6. Table 3-2 illustrates the application environment, products and versions before and after the migration.
20ch_planning.fm Draft Document for Review July 28, 2004 7:33 pm After migration only the new development environment could operate on this machine and as such it is important that you have another WebSphere Commerce Studio V5.1 environment if you need to continue to develop or maintain WebSphere Commerce Suite V5.1 site. The following is a general ordered list of tasks that are required to complete development migration: 1. Backup: Backup files, database and environment assets 2.
6320ch_planning.fm Draft Document for Review July 28, 2004 7:33 pm sufficient capacity to operate both of the instances (and software stacks, for single node install) at the same time. Note: This approach is not supported for Microsoft Windows platforms. In-place migration scenario- migration is done on one system (but a test server is highly recommended). 3.5.
6320ch_planning.fm Draft Document for Review July 28, 2004 7:33 pm FIREWALL Network Address Translation (NAT) DMZ WebSphere Commerce Suite V5.1 WebSphere Commerce V5.6 DB2 UDB V7.2 DB2 UDB V8.1.5 WebSphere Commerce Suite V5.1 runtime environment WebSphere Commerce V5.
6320ch_planning.fm Draft Document for Review July 28, 2004 7:33 pm Bring WebSphere Commerce V5.6 test server online to become the new production server We choose and document this approach in this book, to minimize both the production downtime and the risk involved in migration. Section 3.6, “Approach used for this migration” on page 49 describes more in detail the migration path we followed. 3.5.2 Co-existence migration scenario This approach is suitable if your WebSphere Commerce Suite V5.
6320ch_planning.fm Draft Document for Review July 28, 2004 7:33 pm The following is a general ordered list of tasks that are required to complete an In-place migration: Take WebSphere Commerce Suite V5.1 production server offline Backup production system Perform pre-migration actions Install (for coexistence) or update software levels to WebSphere Commerce V5.
6320ch_planning.fm Draft Document for Review July 28, 2004 7:33 pm 3. Deploy the code changes from the development environment to the production environment to finish the migration of the production environment 3.6.1 Detailed overview of development migration steps Since all the following steps are performed on the development environment there should not be any downtime on the production environment. 1. Backup: Backup files, database and environment assets 2.
6320ch_planning.fm Draft Document for Review July 28, 2004 7:33 pm – Import Java project into WebSphere Commerce V5.6 development environment in WebSphereCommerceServerExtensionLogic 6. Generate deployment code – For full test environment: From the EJB JAR pop-up menu, click Generate > Deployment and RMIC Code – For lightweight test environment: From the EJB JAR pop-up menu, click Generate > Test Deployment Code 7. Generate Access beans 8. Code Changes – Fix any WSAD compilation errors 9.
6320ch_planning.fm Draft Document for Review July 28, 2004 7:33 pm environment #2, and restored a backup of production database on the environment #2.
6320ch_planning.fm Draft Document for Review July 28, 2004 7:33 pm The database tuning parameters given in this script should be considered as as the minimum required. It is highly recommended that you check the values of this script and evaluate your specific database needs, e.g. you may already be using higher values and, in such a case, you should not execute this script. 9. Migrate database schema and unencrypted data: Same actions as performed on the development environment 10.
6320ch_planning.fm 54 Draft Document for Review July 28, 2004 7:33 pm Keeping Commerce Applications Updated WebSphere Commerce 5.1 to 5.
Draft Document for Review July 28, 2004 7:33 pm 6320ch_application_used.fm 4 Chapter 4. Commerce Application used during the migration This chapter provides an overview of the application used during the WebSphere Commerce migration. An overview of the application is given along with a description of the customizations that were made to the default architecture.
6320ch_application_used.fm Draft Document for Review July 28, 2004 7:33 pm 4.1 Commerce application CarrotInk.com is an Internet-based retailer of inkjet printer cartridges and supplies. CarrotInk.com sells after-market and OEM brand printer supplies. The company supplies as many as 400 individual cartridge types, supporting thousands of different printer models. Before migrating to WebSphere Commerce Suite V5.1, the original site contained more than 800 static HTML pages.
Draft Document for Review July 28, 2004 7:33 pm 6320ch_application_used.fm WebSphere Commerce Suite V5.1 Start Edition IBM HTTP Server V1.3.12 Database Server Tier For the database node, DB2 Universal Database V7.2.5 is installed and configured. 4.2 Commerce customization Customization of WebSphere Commerce related to the application has been minimal. The site design was based on the InFashion sample SAR file.
6320ch_application_used.fm Draft Document for Review July 28, 2004 7:33 pm Expected delivery dates have also been implemented for the shipping providers. Custom code was written to calculate the number of expected days that it will take to receive the order. The factors for calculating expected delivery dates are based on the shipping policies of Carrot Ink and each shipping provider. These include exclusion of holidays, non-working days such as Saturday and Sunday, and shipping cut-off times.
6320ch_application_used.
6320ch_application_used.fm Draft Document for Review July 28, 2004 7:33 pm Figure 4-2 illustrates the customized shopping flow of the application. The changes from the InFashion flow are shown in the shaded boxes.
Draft Document for Review July 28, 2004 7:33 pm 6320ch_application_used.fm Table 4-1 provides a summary of the custom commands used with the application. Table 4-1 Custom Commands Default Command(s) Override Command Description ApplyOrderShippingCharg esCmdImpl.java ApplyOrderShippingCharg esCmdImpl.java Implements dynamic shiprates for each shipping provider. The shiprates on factors such as weight of the order and to what zipcode the order will be shipped.
6320ch_application_used.fm Draft Document for Review July 28, 2004 7:33 pm Default Command(s) Override Command Description TXSearchSampleCmd TXSearchSampleCmdImpl N/A Sample commands provided by IBM for use with the DB2 Text Extender. The controller command generates a SQL statement that is then used to query the database to return search results. 4.2.3 Database tables Custom tables were added to increase functionality. Tables were added to implement dynamic shiprates.
Draft Document for Review July 28, 2004 7:33 pm 6320ch_application_used.fm 4.4 Database The database architecture has been modified slightly from the default. No customizations have been made to the WebSphere Commerce schema. However, as mentioned earlier, some tables were added for increasing functionality. Tables were added to implement dynamic ship rates. These tables store data related to shipping zones and ship-to zip codes.
6320ch_application_used.fm 64 Draft Document for Review July 28, 2004 7:33 pm Keeping Commerce Applications Updated WebSphere Commerce 5.1 to 5.
6320p03.fm Draft Document for Review July 28, 2004 7:33 pm Part 2 Part 2 Development environment © Copyright IBM Corp. 2004. All rights reserved.
6320p03.fm 66 Draft Document for Review July 28, 2004 7:33 pm Keeping Commerce Applications Updated WebSphere Commerce 5.1 to 5.
Draft Document for Review July 28, 2004 7:33 pm 6320ch_DEV_installation.fm 5 Chapter 5. Installing WebSphere Commerce Development Environment This chapter details the steps that should be taken to install the development environment for WebSphere Commerce V5.6. Once complete, you will have a fully working WebSphere Commerce development environment, using DB2 Universal Database V8.1 as the database.
6320ch_DEV_installation.fm Draft Document for Review July 28, 2004 7:33 pm 5.1 Development environment overview This section describes how we installed the WebSphere Commerce Developer software package. The development environment consists of the following products: WebSphere Studio Application Developer V5.1.1 WebSphere Commerce V5.6 Toolkit DB2 Universal Database V8.1.5 In the WebSphere Commerce V5.6 Toolkit, two test environments are available, a lightweight environment and a full environment.
Draft Document for Review July 28, 2004 7:33 pm 6320ch_DEV_installation.fm The steps detailed in this chapter are provided under the assumption that you have a fully working WebSphere Commerce Suite V5.1 test environment in VisualAge for Java V3.5.3. It is also assumed that you are using DB2 Universal Database V7.2.5 with a local development database. 5.2.1 VisualAge for Java V4.0 prerequisites In order to install and configure VisualAge for Java V4.
6320ch_DEV_installation.fm Draft Document for Review July 28, 2004 7:33 pm Ensure that the user ID that you are using does not contain double-byte characters. Ensure that the environment variable TEMP or TMP is pointing to a valid temporary directory Ensure that the drive containing the temporary directory (mentioned above) has more than 2GB available. 5.3.2 Installing WebSphere Studio Application Developer V5.1.1 The steps below describe how to install WebSphere Studio Application Developer V5.1.
Draft Document for Review July 28, 2004 7:33 pm 6320ch_DEV_installation.fm Note: The installation program checks to see if WebSphere Studio Application Developer V5.1 is installed. Since this cannot coexist with WebSphere Studio Application Developer V5.1.1, if WebSphere Studio Application Developer V5.1 is detected, a message appears asking if you want the installation program to uninstall it. WebSphere Studio Application Developer V5.1.
6320ch_DEV_installation.fm Draft Document for Review July 28, 2004 7:33 pm 1. Prepare for fixpack installation 2. Install WebSphere Application Server V5.0.2 cumulative fix 3 3. Install interim fixes The installation procedure is described in the following sections. Prepare for fixpack installation Before the fixpack can be applied, the WebSphere Test Environment inside WebSphere Studio Application Developer V5.1.1 must be prepared.
Draft Document for Review July 28, 2004 7:33 pm 6320ch_DEV_installation.fm This starts the update installation wizard. You can close the command prompt at this point. 3. The language prompt will appear. Select the desired language for the Update Wizard and click OK. 4. The Welcome page appears. Click Next. 5. When prompted to select the product to update, check Specify product information and enter the following path in the Installation directory field: \runtimes\base_v5 Click Next.
6320ch_DEV_installation.fm Draft Document for Review July 28, 2004 7:33 pm Install interim fixes Apply the WebSphere Application Server interim fixes to your WebSphere Studio Application Developer V5.1.1 installation as follows. The update installation wizard should still be open from the previous step: 1. From the Update Installation Wizard, select Install fixes and click Next. Note: The Install fixes is the third option on the window, easily confused with the first option, Install fixpacks. 2.
Draft Document for Review July 28, 2004 7:33 pm 6320ch_DEV_installation.fm Important: Fixes must be installed in the order they are listed and one at a time because each fix often replace files from the one before it. If you do not apply these fixes in the correct order, your test environment may not work properly. 14.After the last fix, PQ85469, has been applied, you can click Finish to close the Update Installation Wizard. 5.4 Installing WebSphere Commerce V5.
6320ch_DEV_installation.fm Draft Document for Review July 28, 2004 7:33 pm 5.4.1 Installing WebSphere Commerce V5.6 Toolkit The steps below describe how to install WebSphere Commerce V5.6 Toolkit. 1. Insert the WebSphere Commerce V5.6 Toolkit CD in the CD-ROM of the WebSphere Studio Application Developer V5.1.1 machine. The WebSphere Commerce V5.6 Toolkit installation wizard should start automatically. If the installation does not start automatically, run setup.
Draft Document for Review July 28, 2004 7:33 pm 6320ch_DEV_installation.fm set WSAD_HOME=D:\WebSphere\WSAD511 call setshortname RUNTIME_JARS ..\AppServer\classes call setshortname RUNTIME_CLASSES ..\AppServer\classes call setshortname J2EE_JAR ..\AppServer\lib\j2ee.jar call setshortname XERCES_JAR ..\AppServer\lib\xerces.jar call setshortname XALAN_JAR ..\AppServer\lib\xalan.jar call setshortname XMLPARSERAPIS_JAR ..\AppServer\lib\j2ee.jar call setshortname JAVA_HOME ..
6320ch_DEV_installation.fm Draft Document for Review July 28, 2004 7:33 pm databases are not interchangeable between these DB2 Universal Database versions. In this case you will have a DB2 Universal Database V7.2.5 level of your databases, should you later need to change back to DB2 Universal Database V7.2.5. In our example, we created a backup of the database MALL, as the remaining databases can be recreated if necessary. 5.5.
Draft Document for Review July 28, 2004 7:33 pm 6320ch_DEV_installation.fm – password is the password for this user In our example, we used the following: db2ckmig mall -L D:\db2miglog.txt -U dbusr01 -P dbusr01pwd If there are no potential problems, you will see the following output in the command line. db2ckmig was successful. Database(s) can be migrated. 4. Inspect the content of the log file, specified as a parameter to db2ckmig, to ensure that no error conditions are logged.
6320ch_DEV_installation.fm Draft Document for Review July 28, 2004 7:33 pm 8. Deselect User must change password at next logon. 9. Select User cannot change password and Password never expires. 10.Click Create. 11.Click Close. Before this new user can be used by DB2, it must be given administrative rights. To do this, complete the following steps: 1. In the Computer Management window, right-click on the user you just created and select Properties from the menu. 2.
Draft Document for Review July 28, 2004 7:33 pm 6320ch_DEV_installation.fm If the response is a list of database agent connections, you must ensure that each of the corresponding processes are ended before continuing. Tip: A typical installation of DB2 Universal Database V7.2.5 will include the DB2 Warehouse components. These will be registered as Windows services, to be started automatically.
6320ch_DEV_installation.fm Draft Document for Review July 28, 2004 7:33 pm – Information that the Query Patroller Client is not available in the new version of DB2 Universal Database as shown in Figure 5-2. We clicked Yes to continue. Figure 5-2 Warning that a feature is not available in DB2 Universal Database V8.1 – Information that we should run the db2chmig tool against our databases before upgrading, as shown in Figure 5-3. We clicked OK to continue, as we have already done this in 5.5.
Draft Document for Review July 28, 2004 7:33 pm 6320ch_DEV_installation.fm 10.In the User Information frame, enter the user name and password of the user that you created in 5.5.3, “Preparing a Windows user for DB2” on page 79. Ensure that Use the same user name and password for the remaining DB2 services is checked and click Next. 11.In the Administration contact list page, select Local - Create a contact list on this system, ensure that Enable notification is unchecked and click Next.
6320ch_DEV_installation.fm Draft Document for Review July 28, 2004 7:33 pm Important: You will need at least 500MB of free space on the drive where the TEMP environment variable points to. This is typically the Windows installation drive. 2. When the Launchpad window opens, click Install Product. Note: The Launchpad window is identical to the original DB2 Universal Database V8.1 Launchpad window, although it is in fact the fixpack 5 Launchpad window. 3. Click Next to start the installation.
Draft Document for Review July 28, 2004 7:33 pm 6320ch_DEV_installation.fm 5.5.6 Migrate databases to DB2 Universal Database V8.1 level At this point, the databases in the system are all DB2 Universal Database V7.2.5 databases, not compatible with DB2 Universal Database V8.1. In order to use the databases, you must migrate these. To migrate the databases, perform the following steps: 1. Log on to the system with a Windows administrator 2.
6320ch_DEV_installation.fm Draft Document for Review July 28, 2004 7:33 pm Note: After completing this chapter, the development database will still be using the schema for WebSphere Commerce Suite V5.1. The migration steps in the next chapter will migrate the database to the new schema for WebSphere Commerce V5.6. Complete the following steps: 1. Ensure that WebSphere Studio Application Developer V5.1.1 is not running. 2.
Draft Document for Review July 28, 2004 7:33 pm 6320ch_DEV_installation.fm 5.7 Installing VisualAge for Java V4.0 If you have developed custom EJBs for your WebSphere Commerce Suite V5.1 store and wish to migrate them to your new development environment, you will need to install VisualAge for Java V4.0. Attention: Please read the opening paragraphs of 7.5, “Migrating custom EJBs” on page 118 to determine if you wish to do this step.
6320ch_DEV_installation.fm Draft Document for Review July 28, 2004 7:33 pm Note: VisualAge for Java V3.5.3 and VisualAge for Java V4.0 cannot coexist on the same system. As such, you must install VisualAge for Java V4.0 on a separate system, remote from your VisualAge for Java V3.5.3 installation. Alternatively, if your access to additional systems is limited, you could perform the steps in the following order: 1. Follow the instructions in 6.2.4, “Export code from VisualAge for Java V3.5.
Draft Document for Review July 28, 2004 7:33 pm 6320ch_DEV_installation.fm 10.The repository location window appears. Ensure that Local is selected and click Next. 11.The Ready to install program confirmation window appears. Click Install. 12.When the installation is complete, a confirmation window will appear. Click Finish to close the window. At this point, VisualAge for Java V4.0 is installed with a default workspace. In the next section, we will import the WebSphere Commerce Suite V5.
6320ch_DEV_installation.fm Draft Document for Review July 28, 2004 7:33 pm Install the DeployTool fix The DeployTool fix upgrades the version of the Export Tool for EJBs and can be found on the original WebSphere Commerce Studio V5.4 CD in the efixes/vaj directory. The fix is stored in the file EJB-1.1-DeployedTool.zip. To install this fix, complete the following steps: 1. Ensure that VisualAge for Java V4.0 is not running. 1. Extract the EJB-1.1-DeployedTool.
Draft Document for Review July 28, 2004 7:33 pm 6320ch_DEV_installation.fm This will create the following three files in the \ide\_update directory, where is the installation directory for VisualAge for Java V4.0: – readonly.tfs – readonly.tfi – readonly.txt 3. Open VisualAge for Java V4.0. 4. Select Workspace -> Tools -> Fix Manager. 5. In the Fix manager window, select readonly - Prevent invalid deletion of EJB read-only attributes and click the >> button, then click OK. 6.
6320ch_DEV_installation.fm Draft Document for Review July 28, 2004 7:33 pm 8. Version the IBM WebSphere Test Environment project by right-clicking on the IBM WebSphere Test Environment project, and selecting Manage -> Version. 9. Select One Name, enter 3.5.3 PQ50159 in the text field and click OK. Install IBM EJB Tool fix To apply the fix to the IBM EJB Tool project, do the following: 1. In VisualAge for Java V4.0, create an open edition of the project IBM EJB Tool. 2.
Draft Document for Review July 28, 2004 7:33 pm 6320ch_DEV_installation.fm Note: These instructions are only necessary if you choose to import the WebSphere Commerce Suite V5.1 repository into VisualAge for Java V4.0. If you have access to the WebSphere Commerce Suite V5.4 repository and your custom EJBs do not rely on features only present in WebSphere Commerce Suite V5.1, you can use that repository instead, and will not have to delete the packages mentioned here.
6320ch_DEV_installation.fm Draft Document for Review July 28, 2004 7:33 pm VisualAge for Java V4.0 is now ready for you to import your custom EJBs as part of the migration. This will be covered in 7.5, “Migrating custom EJBs” on page 118. 94 Keeping Commerce Applications Updated WebSphere Commerce 5.1 to 5.
Draft Document for Review July 28, 2004 7:33 pm 6320ch_DEV_before_migration.fm 6 Chapter 6. Pre-migration steps This chapter describes the tasks needed to prepare the development instance and database for migration. These steps will partially overlap the pre-migration steps for the runtime environment, covered in Chapter 10, “Pre-migration steps” on page 183. This chapter is organized as following: Preparation overview Instance preparation Database preparation © Copyright IBM Corp. 2004.
6320ch_DEV_before_migration.fm Draft Document for Review July 28, 2004 7:33 pm 6.1 Preparation overview This chapter describes the actions needed to prepare the WebSphere Commerce Suite V5.1 development environment prior to migrating to WebSphere Commerce V5.6 Developer. It is recommended to prepare and migrate the elements in the following order: 1. Instance 2.
Draft Document for Review July 28, 2004 7:33 pm 6320ch_DEV_before_migration.fm 6.2 Instance preparation Before you can migrate the development instance, you must prepare the development system, as described in this section. 6.2.1 Updating the product information file Before running the WCIM tool, you must create a product.xml file for WebSphere Commerce Suite V5.1. This file will be used by the tool to determine details about your installation that are required during the instance migration process.
6320ch_DEV_before_migration.fm Draft Document for Review July 28, 2004 7:33 pm 6. Save and close the file. 7. Copy the file product.dtd from the following directory : \xml To the following directory: \xml For example, we copied the file product.dtd from the directory: D:\WebSphere\WCToolkit56\xml To the following directory: D:\WebSphere\WCS\xml Example 6-1 Example product.
Draft Document for Review July 28, 2004 7:33 pm 6320ch_DEV_before_migration.fm WebSphere Commerce version edition_name value WebSphere Commerce Suite V5.1 Professional Edition Pro WebSphere Commerce Suite V5.1 Business Edition Business Table 6-2 Choosing the value for mod WebSphere Commerce version mod value WebSphere Commerce Suite V5.1.0.1 0 WebSphere Commerce Suite V5.1.1 1 WebSphere Commerce Suite V5.1.1.
6320ch_DEV_before_migration.fm Draft Document for Review July 28, 2004 7:33 pm Where is the VisualAge for Java V3.5.3 installation directory. In order for the migration tools to correctly migrate properties files and JSPs, you must ensure that they are located in the directories mentioned. Note: It may be that the properties and JSP files for your store already exist in the mentioned directories. In either case, you should double-check that these files are the correct versions. 6.2.
Draft Document for Review July 28, 2004 7:33 pm 6320ch_DEV_before_migration.fm “Migrating custom EJBs” on page 118 and 8.2.6, “Configuration and code changes for migrated EJBs” on page 144. Overview VisualAge for Java provided a source control feature through the concept of a repository. This feature allowed typical source control functionality such as restoring previous editions of code and marking releases etc.
6320ch_DEV_before_migration.fm Draft Document for Review July 28, 2004 7:33 pm 3. Select Jar file and click Next. 4. In the Jar file: text box, enter a path and filename for your exported code. In our example, we used D:\MyStoreCommands.jar. 5. Ensure that only the .java check box is checked, and unchecking the .class, resources and beans if necessary. If you wish to check that all of your code is selected correctly, you can click the Details... button next to .java. 6.
Draft Document for Review July 28, 2004 7:33 pm 6320ch_DEV_before_migration.fm updateDB2Configuration [] Where is the name of the database to change configuration values for and is an optional parameter, naming the file to use for logging the progress of the script. Important: The script must be called from a DB2 Command Window.
6320ch_DEV_before_migration.fm Draft Document for Review July 28, 2004 7:33 pm Important: Ensure that all connections to the database are terminated before continuing. Otherwise the changes performed by the script in this section may not take effect. 6.3.2 Unsent messages If the development database contains any messages in the MSGSTORE table, these must be removed before migrating the database, as they cannot be handled by WebSphere Commerce V5.6.
Draft Document for Review July 28, 2004 7:33 pm 6320ch_DEV_before_migration.fm Master catalog In order to be able to use the product management tools in the WebSphere Commerce Accelerator, the store must have a valid master catalog. Refer to “Master catalog” on page 193 for details about master catalogs and a procedure for generating a valid master catalog for your store. Product-item relationship In WebSphere Commerce V5.6 all items must have a product.
6320ch_DEV_before_migration.fm Draft Document for Review July 28, 2004 7:33 pm All organizations without a parent organization, that is organizations for which the MEMBER_ID column of ORGENTITY is set to null, will have Root Organization assigned as their parent organization. If this is not desired, you must update the MEMBER_ID column for the organizations that must have other parent organizations before migrating.
Draft Document for Review July 28, 2004 7:33 pm 6320ch_DEV_before_migration.fm Administrators Administrators with register type S or A (Site administrator or Administrators, respectively) that also belongs to an access group must have their profile type set to B (Business user). This is because all future administrators created in Organization Administration Console will have profile type B.
6320ch_DEV_before_migration.fm Draft Document for Review July 28, 2004 7:33 pm 3. Customer Service Representative We found that Store Administrator would be a more suitable role for these two users. Therefore we assigned these two users the Store Administrator role instead.
6320ch_DEV_before_migration.fm Draft Document for Review July 28, 2004 7:33 pm Once the migration has completed successfully, you must recreate your foreign key relationships manually. If possible, while you are working on the migration, it is a good idea if a member or your team starts create a script that will recreate the references once the migration has completed.
6320ch_DEV_before_migration.fm 110 Draft Document for Review July 28, 2004 7:33 pm Keeping Commerce Applications Updated WebSphere Commerce 5.1 to 5.
Draft Document for Review July 28, 2004 7:33 pm 6320ch_DEV_migration.fm 7 Chapter 7. Migrating the development environment This chapter describes the process of migrating your store from the WebSphere Commerce Suite V5.1 development environment with VisualAge for Java V3.5.3 to the WebSphere Studio Application Developer V5.1.1 based WebSphere Commerce V5.6 development environment.
6320ch_DEV_migration.fm Draft Document for Review July 28, 2004 7:33 pm 7.1 Current development environment This is a high level overview of the development environment as was installed for WebSphere Commerce Suite V5.1 development. Our WebSphere Commerce Suite V5.1 development environment consisted of a single-tier installation of WebSphere Commerce running on DB2 Universal Database V7.2.5. We had a single instance called demo created for our store.
Draft Document for Review July 28, 2004 7:33 pm 6320ch_DEV_migration.fm 7.3 Migrating the development instance This section details the use of the WCIM tool to perform the instance migration in your development environment. In WebSphere Commerce Suite V5.1, the development environment is reliant on a local run-time instance. Configuration of the WebSphere Test Environment in VisualAge is taken from the configuration files of this instance.
6320ch_DEV_migration.fm Draft Document for Review July 28, 2004 7:33 pm 7.3.2 Running the tool To run the WCIM tool, complete the following steps: 1. Open a command prompt in windows. 2. Navigate to the following directory: \bin In our example, we used the following directory: D:\WebSphere\WCToolkitPro56\bin. 3. Run the WCIM tool as follows: wcim -component toolkit -from 51 -instance instancename where instancename is the name of your instance in your development environment.
Draft Document for Review July 28, 2004 7:33 pm 6320ch_DEV_migration.fm Event: Starting to execute command com.ibm.commerce.migration.wcim.command.WCIMMigrateStudioCommand Event: Method: migrateDevEnv Enter the previous WebSphere Commerce home directory: D:\WebSphere\WCS Enter the home directory of VisualAge for Java: D:\WebSphere\VAJava Enter the name of the custom code JAR file: D:\MyStoreCommands.
6320ch_DEV_migration.fm Draft Document for Review July 28, 2004 7:33 pm Note: At this point the WebSphere Test Environment inside WebSphere Studio Application Developer V5.1.1 has been updated and your custom commands and data beans have been imported into WebSphere Studio Application Developer. The development environment is not completely migrated until the migration steps in the following section are completed. 7.
Draft Document for Review July 28, 2004 7:33 pm 6320ch_DEV_migration.fm We used the following command: migratedb -dbtype db2 -dbname mall -dbuser dbusr01 -dbpass dbusr01pwd -from 51 -instance demo -schema dbuser01 In our example, with 1400 users, 1400 orders and 2700 order items, the database migration script took 15 minutes. 7.4.2 Migrating encrypted data This sections explains how to run the script to migrate your encrypted data within your database and to reflect a new merchant key.
6320ch_DEV_migration.fm Draft Document for Review July 28, 2004 7:33 pm 7.4.3 Summary At this point, you should be at the following stage of migration: You have installed and configured the new WebSphere Commerce test environment in WebSphere Studio Application Developer V5.1.1. Your development WebSphere Commerce instance is migrated to the new test environment in WebSphere Studio Application Developer V5.1.1. Your existing development database has been migrated from DB2 Universal Database V7.2.
Draft Document for Review July 28, 2004 7:33 pm 6320ch_DEV_migration.fm Note: The process of migrating EJBs to the new specification is not straightforward. The level of effort involved is often the same or greater than recreating the EJBs from scratch using the tools in WebSphere Studio Application Developer V5.1.1. We would recommend that unless you have 10 EJBs or more you should consider recreating them in WebSphere Studio Application Developer V5.1.1.
6320ch_DEV_migration.fm Draft Document for Review July 28, 2004 7:33 pm VisualAge for Java V3.5.3 EJB 1.0 Repository VisualAge for Java V4.0 EJB 1.1 JAR WebSphere Studio Application Developer V5.1.1 Figure 7-2 Process for converting from EJBs from version 1.0 to 1.1 Before you continue, you must have installed and configured a VisualAge for Java V4.0 system as described in 5.7.1, “Installing VisualAge for Java V4.0” on page 87.
Draft Document for Review July 28, 2004 7:33 pm 6320ch_DEV_migration.fm Reminder: Ensure that only EJB code exists in the project you select for export. 4. Right-click on the project and select Export... from the menu. The Export Smart Guide will appear 5. Select Repository as the export destination and click Next. 6. On the next page, make sure that Local Repository is selected. 7. Specify a location for your exported repository in the Repository name text-box. For example, D:\myStoreEjbs.dat 8.
6320ch_DEV_migration.fm Draft Document for Review July 28, 2004 7:33 pm c. Select the option to import Projects and click Details... next to this option. d. In the window that opens, select your EJB project and click OK. e. Check the option to Add most recent project edition to workspace and click Finish. Even with only small numbers of EJBs in your repository, VisualAge can take several minutes to complete the import. 5.
Draft Document for Review July 28, 2004 7:33 pm 6320ch_DEV_migration.fm 3. Choose a path and file name for the JAR file and enter it into the JAR file text box. 4. Ensure that DB2 for NT, V7.1 is selected in the target database list. 5. Check the options for .class and .java. Uncheck resource if it is selected. 6. Click Finish to start the export. Even with small numbers of EJBs, this can take a long time.
6320ch_DEV_migration.fm 124 Draft Document for Review July 28, 2004 7:33 pm Keeping Commerce Applications Updated WebSphere Commerce 5.1 to 5.
Draft Document for Review July 28, 2004 7:33 pm 6320ch_DEV_post_migration.fm 8 Chapter 8. Post-migration steps This chapter describes the additional steps to be performed after the development instance and database have been migrated.
6320ch_DEV_post_migration.fm Draft Document for Review July 28, 2004 7:33 pm 8.1 Setting up aliases The application that we migrated contained static web content that was addressed outside the scope of the web application in order to minimize the load on the application server. The WebSphere Commerce V5.6 Toolkit does not contain any static web projects when installed, so in order to support static web content, you must do the following: 1. Create a new Dynamic Web Project: a.
Draft Document for Review July 28, 2004 7:33 pm 6320ch_DEV_post_migration.fm Example 8-1 Excerpt from the looseconfig.xmi file : : : PAGE 1466320ch_DEV_post_migration.fm Draft Document for Review July 28, 2004 7:33 pm : : : 4. Edit the application.xml file located in one of the following directories, depending on the type of test environment that you use: – Full test environment: \applications\wcfull.
6320ch_DEV_post_migration.fm Draft Document for Review July 28, 2004 7:33 pm : : : 5. Start or restart the server in WebSphere Studio Application Developer. 8.2 Migrating custom code This section describes the mandatory and optional changes necessary to complete the migration from WebSphere Commerce Suite V5.1 to WebSphere Commerce V5.6.
6320ch_DEV_post_migration.fm Draft Document for Review July 28, 2004 7:33 pm In WebSphere Commerce Suite V5.1, fine-grained resource control was implemented programatically using the following methods: public Long[] getResourceOwners() throws ECException public boolean checkPermission() throws ECException These methods became deprecated in WebSphere Commerce Suite V5.4.
6320ch_DEV_post_migration.fm Draft Document for Review July 28, 2004 7:33 pm RunTime Framework PolicyManager Command Resource isAllowed(User,Action,Resource) : Command level getOwner( ) getAndApplyApplicablePolicies( ) validateParameters( ) getResources( ) isAllowed(User,Action,Resource) : Resource level getOwner( ) getAndApplyApplicablePolicies( ) fulfills(Member, Relationship) performExecute( ) Figure 8-1 Sequence diagram for WebSphere Commerce V5.6 command framework 8.2.
6320ch_DEV_post_migration.fm Draft Document for Review July 28, 2004 7:33 pm latter approach is recommended, as validation of the user ID should happen in the update command. Important: UserRegistrationUpdateCmd, UserRegistrationAddCmd and UserRegistrationDeleteCmd must be invoked as URL commands.
6320ch_DEV_post_migration.fm Draft Document for Review July 28, 2004 7:33 pm com.ibm.commerce.order.utils.ApplyCalculationUsagesCmd com.ibm.commerce.price.commands.ApplyOrderAdjustmentsCmd com.ibm.commerce.fulfillment.commands.ApplyOrderShippingChargesCmd com.ibm.commerce.taxation.commands.ApplyOrderTaxesCmd Typically, the implementation classes for these commands would be referenced by the custom implementation, either by extending or other means.
6320ch_DEV_post_migration.fm Draft Document for Review July 28, 2004 7:33 pm Note: Table 8-1 does not show any mapping for the WebSphere Commerce Suite V5.1 ApplyCalculationUsagesCmd command. The reason for this is that this command is not meant to be used independently. Instead, this command is the base class for the rest of the calculation commands mentioned. Additionally, Table 8-1 does not display the calculate usage for coupons as this was not available in WebSphere Commerce Suite V5.1.
Draft Document for Review July 28, 2004 7:33 pm 6320ch_DEV_post_migration.fm 2. Use Table 8-1 on page 133 to identify the WebSphere Commerce V5.6 interface that match the WebSphere Commerce Suite V5.1 interface used in the previous step. In our example, the WebSphere Commerce V5.6 interface is com.ibm.commerce.order.calculation.ApplyShippingCmd. 3. Create a custom interface, extending the the WebSphere Commerce V5.6 command interface.
6320ch_DEV_post_migration.fm Draft Document for Review July 28, 2004 7:33 pm */ protected Item[] getItems() { return iItems; } /** * Set the list of order items that must be processed. */ public void setItems(Item[] items) { super.setItems(items); iItems = items; } /** * Apply order adjustments to all items in iItems. * Update iAppliedItems with the items that have had order adjustments * applied to them. */ public void performExecute() { : : // customized shipping calculation...
Draft Document for Review July 28, 2004 7:33 pm 6320ch_DEV_post_migration.fm public void checkAppliedItems() throws ECException { final String METHOD_NAME = "checkAppliedItems"; if(ECTrace.traceEnabled(COMPONENT)) { ECTrace.trace( COMPONENT, CLASS_NAME, METHOD_NAME, "itemIds=" + CalculationHelper.getInstance().toString(iItems)); ECTrace.trace( COMPONENT, CLASS_NAME, METHOD_NAME, "appliedItems=" + appliedItems); } for(int i = 0; i < iItems.
6320ch_DEV_post_migration.fm Draft Document for Review July 28, 2004 7:33 pm (, , , current timestamp) Where is the store ID, is the name of the WebSphere Commerce V5.6 interface, matching the original WebSphere Commerce Suite V5.1 interface, and is the full name, including package, of the custom version of the WebSphere Commerce V5.6 implementation class.
Draft Document for Review July 28, 2004 7:33 pm 6320ch_DEV_post_migration.fm and storeent_id=-1 Where is the ID of the store, is the ID of the new entry that was added to the CALMETHOD table and is the calculation usage ID from Table 8-1 on page 133. Interface changes This section gives an overview of the most important changes from WebSphere Commerce Suite V5.1 to WebSphere Commerce V5.6 in the signature of the payment commands.
6320ch_DEV_post_migration.fm Draft Document for Review July 28, 2004 7:33 pm public java.util.Set getAppliedItems() This method should return a java.util.Set instance containing the Item instances that have had adjustments calculated and applied. The method should be used in the checkAppliedItems method. Note: We found that at the time of writing, the ApplyShippingCmdImpl and ApplyCalculationUsageCmdImpl command implementations did not use the getAppliedItems method from the checkAppliedItems method.
Draft Document for Review July 28, 2004 7:33 pm 6320ch_DEV_post_migration.fm This method has been made obsolete by the introduction of the getCurrency method in the CalculationCmd interface, which is the ancestor interface to ApplyCalculationUsageCmd and ApplyShippingCmd interfaces. public void setOrderItems(...) This method existed in two overloaded versions, taking either an array or a java.util.Enumeration of OrderItemAccessBean instances.
6320ch_DEV_post_migration.fm Draft Document for Review July 28, 2004 7:33 pm Tip: Mapping OrderItemAccessBean to Item considerations: If an accessor is not available in the interface to Item, it is possible to access the underlying OrderItemAccessBean using the following method: public OrderItemAccessBean getOrderItem() This should be avoided, if at all possible. Table 8-2 shows only the accessors that directly map between OrderItemAccessBean and Item.
Draft Document for Review July 28, 2004 7:33 pm 6320ch_DEV_post_migration.
6320ch_DEV_post_migration.fm Draft Document for Review July 28, 2004 7:33 pm 8.2.6 Configuration and code changes for migrated EJBs EJBs developed in VisualAge for Java V3.5.3 follow the EJB 1.0 specification. these must be converted to EJB 1.1 specification level. Since the process of converting involves exporting the EJB code from VisualAge for Java V3.5.3, importing the EJBs into VisualAge for Java V4.0, exporting from VisualAge for Java V4.
Draft Document for Review July 28, 2004 7:33 pm 6320ch_DEV_post_migration.fm Figure 8-2 Adding string converters to an access bean in VisualAge for Java V3.5.3 The access bean configuration data is stored in the file ibm-ejb-access-bean.xmi, placed in the ejbModule/META-INF folder of the WebSphereCommerceServerExtensionsData project in WebSphere Studio Application Developer V5.1.1. A sample file is shown in Example 8-7. Note that field1 and field2 have set up string converters, whereas field3 does not.
6320ch_DEV_post_migration.fm Draft Document for Review July 28, 2004 7:33 pm Example 8-7 Example ibm-ejb-access-bean.xmi file PAGE 165Draft Document for Review July 28, 2004 7:33 pm 6320ch_DEV_post_migration.fm 2. Switch to the J2EE Perspective by with clicking it’s icon or clicking Window -> Open Perspective -> J2EE. 3. Expand WebSphereCommerceServerExtensionsData and open the EJB Deployment Descriptor. 4. Click on the Access tab. 5. In the Isolation Level section: a. Click Committed and then click Remove. b. Click Add.... c. Ensure Repeatable read is selected and click Next. d. Select all of your custom EJBs and click Next. e.
6320ch_DEV_post_migration.fm Draft Document for Review July 28, 2004 7:33 pm g. Save your changes by pressing Ctrl + S and close the EJB Deployment Descriptor document. Remember, these changes will not take effect until you have regenerated the deploy code for your EJBs in “Regenerating the deploy code” on page 152. Add the WCSecurity role Follow these instructions to add the WCSecurity role to all methods in your beans.
Draft Document for Review July 28, 2004 7:33 pm 6320ch_DEV_post_migration.fm Change the container transaction type From the Assembly Descriptor tab of the EJB Deployment Descriptor. (see , “Add the WCSecurity role” on page 148 for details), do the following: 1. If any transaction levels are already associated with your EJBs, you may wish to remove them and re-add them again. This is easier than finding which need to be updated and which do not. 2. In the Container Transactions section, Click Add....
6320ch_DEV_post_migration.fm Draft Document for Review July 28, 2004 7:33 pm Note: As the ejbCreate method on session beans must have return type void, they are not encompassed by this change. See section 6.10.3 of the EJB 1.1 specification for details on ejbCreate methods for session beans. If one of the ejbCreate methods in your entity bean is not declared to return an object of the primary key type, WebSphere Studio Application Developer V5.1.
Draft Document for Review July 28, 2004 7:33 pm 6320ch_DEV_post_migration.fm Where x.y.z denotes the subsection number in the EJB 1.1 specification in which the use of java.rmi.RemoteException deprecation for the relevant method is mentioned. For ejbCreate and ejbPostCreate this will be 9.2.3 and 9.2.4, respectively.
6320ch_DEV_post_migration.fm Draft Document for Review July 28, 2004 7:33 pm public abstract java.util.Enumeration findGreaterThan(Integer value) throws java.rmi.RemoteException, javax.ejb.FinderException; Note: Other methods for generating finder methods were available, but the one described here was the recommended method. The FinderHelper interface has been replaced in WebSphere Studio Application Developer V5.1.1 with the use of the file ibm-ejb-jar-ext.
Draft Document for Review July 28, 2004 7:33 pm 6320ch_DEV_post_migration.fm If your WebSphere Commerce Suite V5.1 solution contains code that uses connectors, you must rewrite this code to use the J2EE Connector Architecture. For more information about the J2EE Connector Architecture, see: http://java.sun.com/j2ee/connector Note: This does not apply to code that uses the WebSphere Commerce Suite V5.
6320ch_DEV_post_migration.fm Draft Document for Review July 28, 2004 7:33 pm 8.2.9 Product Advisor WebSphere Commerce Suite V5.1 contains the following three files in the \samples\web\pa directory: pc51.jsp pe51.jsp sa51.jsp WebSphere Commerce V5.6, during the installation, provides newer versions for these sample files available in the following directories: For WebSphere Commerce V5.6 runtime: – \samples\web\pa – installedApps\\WC_.ear\Stores.
Draft Document for Review July 28, 2004 7:33 pm 6320ch_DEV_post_migration.fm Any code, referring to the types using the old package names must be updated to work with WebSphere Commerce V5.6. 8.2.10 Rule server administration commands A number of changes have been made to the structure and behavior of the rule service administration commands. Refer to Migration Guide for WebSphere Commerce Developer - migrating from WebSphere Commerce Studio V5.1 for details about the changes. 8.2.
6320ch_DEV_post_migration.fm Draft Document for Review July 28, 2004 7:33 pm D:\WebSphere\AppServer\installedApps\wcs56h\WC_demo.ear\Stores.war\MyS tore the following summary of changes has been added to improve the error handling: Add logic to check the error code returned and create error message to show user Example 8-8 shows part of the content of the modified myAccount.jsp file. The changes are outlined in bold. Example 8-8 The content of the modified myAccount.
Draft Document for Review July 28, 2004 7:33 pm 6320ch_DEV_post_migration.fm the following summary of changes has been added to improve the error handling: Add import statement to import the package which contains the new error codes Add logic to check the error code returned and create error message to show user Example 8-9 shows part of the content of the modified register.jsp file. The changes are outlined in bold. Example 8-9 The content of the modified register.
6320ch_DEV_post_migration.fm Draft Document for Review July 28, 2004 7:33 pm :