WebSphere Studio Application Developer Version 5 Programming Guide part 2 pptx

10 296 0
WebSphere Studio Application Developer Version 5 Programming Guide part 2 pptx

Đang tải... (xem toàn văn)

Thông tin tài liệu

x WebSphere Studio Application Developer Version 5 Programming Guide Object-relational mapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 409 Implementing the session facade. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 415 Creating the session bean . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 416 Creating an EJB reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 418 Editing the session bean . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 421 Generating the deployed code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 426 Completing the EJB deployment descriptor . . . . . . . . . . . . . . . . . . . . . . . . . . 427 Changing the data source for EJB access . . . . . . . . . . . . . . . . . . . . . . . . 428 Testing the EJBs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 428 Universal test client . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 428 Adapting the Web applications. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 436 Web project dependencies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 437 EJB references . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 438 Testing the Web interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 439 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 440 Chapter 13. Developing Web services. . . . . . . . . . . . . . . . . . . . . . . . . . . . 441 The concept of a service-oriented architecture (SOA) . . . . . . . . . . . . . . . . . . 442 Web services approach for an SOA architecture . . . . . . . . . . . . . . . . . . . . . . 443 Web services tools in Application Developer . . . . . . . . . . . . . . . . . . . . . . . . . 445 Bottom-up development of a Web service . . . . . . . . . . . . . . . . . . . . . . . . 445 Top-down development of a Web service. . . . . . . . . . . . . . . . . . . . . . . . . 445 Client development . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 446 Preparation for samples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 446 Creating a Web service from a JavaBean . . . . . . . . . . . . . . . . . . . . . . . . . . . 446 Creating the Web service using the Web Service wizard . . . . . . . . . . . . . 447 Generated files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 455 Testing the Web service. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 459 Using the sample test application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 459 Using the universal test client . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 460 Creating a Web service client. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 461 Run the Web Service Client wizard. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 461 Creating a Web service from a session bean. . . . . . . . . . . . . . . . . . . . . . . . . 464 Implementing a real client application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 465 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 467 More information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 467 Chapter 14. Developing GUI applications . . . . . . . . . . . . . . . . . . . . . . . . . 469 Introduction to the Visual Editor for Java . . . . . . . . . . . . . . . . . . . . . . . . . . . . 470 Sample GUI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 470 Setting up your sample project. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 471 Launching the Visual Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 472 Create a visual class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 473 Contents xi Open an existing class with the Visual Editor . . . . . . . . . . . . . . . . . . . . . . 475 Visual Editor look and feel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 475 Customizing the appearance of the Visual Editor . . . . . . . . . . . . . . . . . . . . . 478 Changing the default Java Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 480 Working with the Visual Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 481 Resizing a JavaBean component . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 482 Code synchronization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 483 Add JavaBeans to a visual class. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 485 Working with the Properties view . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 487 Working with the Java Beans view . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 490 Extending the sample GUI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 492 Adding data to the JavaBean . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 498 Adding additional methods to the sample GUI. . . . . . . . . . . . . . . . . . . . . . . . 500 Writing event handling code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 502 Running and testing JavaBeans. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 504 Running the sample GUI as a JavaBean . . . . . . . . . . . . . . . . . . . . . . . . . 505 Running the sample GUI as a Java application . . . . . . . . . . . . . . . . . . . . 507 Testing the sample GUI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 508 Running the sample outside of Application Developer. . . . . . . . . . . . . . . . . . 508 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 509 Part 3. Testing and debugging applications. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 511 Chapter 15. Servers and server configurations . . . . . . . . . . . . . . . . . . . . 513 Server tools feature . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 514 Supported run-time environments. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 514 Creating server and server configuration automatically . . . . . . . . . . . . . . . . . 516 Creating server and server configuration manually . . . . . . . . . . . . . . . . . . . . 519 Creating a Server project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 519 Creating a remote server and file transfer mechanism . . . . . . . . . . . . . . . 520 Creating a server configuration manually . . . . . . . . . . . . . . . . . . . . . . . . . 527 Assigning a server configuration to a server . . . . . . . . . . . . . . . . . . . . . . . 530 Creating a server and server configuration together . . . . . . . . . . . . . . . . . . . 530 Assigning a project to a server configuration . . . . . . . . . . . . . . . . . . . . . . . . . 531 Configuring the data source . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 533 Starting and stopping servers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 535 Changing the applications to run on a remote server. . . . . . . . . . . . . . . . . . . 538 Apache Tomcat . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 539 TCP/IP Monitor. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 540 Configuring the TCP/IP Monitor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 541 Using the TCP/IP Monitor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 542 Customizing server configurations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 544 Server page. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 544 xii WebSphere Studio Application Developer Version 5 Programming Guide Configuration page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 545 Applications page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 545 Administrative console . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 548 Applying Fix Packs to the WebSphere test environment . . . . . . . . . . . . . . . . 549 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 551 Chapter 16. Testing and debugging. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 553 Debugging a Web application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 554 Setting breakpoints in a servlet. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 554 Setting breakpoints in a JSP. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 556 Testing the application with breakpoints enabled. . . . . . . . . . . . . . . . . . . . . . 557 Debug view with stack frames. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 560 Debug functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 560 Breakpoints view. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 561 Watching variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 561 Inspecting variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 562 Evaluating an expression . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 563 Debugging a JSP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 564 Debugging on a remote WebSphere Application Server . . . . . . . . . . . . . . . . 566 Configuring the remote server. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 566 Attaching to remote server in Application Developer . . . . . . . . . . . . . . . . 567 Connecting to the remote server. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 569 Debugging on the remote server. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 569 Disconnecting from the remote server . . . . . . . . . . . . . . . . . . . . . . . . . . . 572 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 572 Chapter 17. JUnit and component testing . . . . . . . . . . . . . . . . . . . . . . . . 573 What is JUnit? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 574 Unit testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 574 Why unit testing?. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 574 Benefits of a unit testing framework . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 575 Testing with JUnit. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 576 TestCase class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 577 TestSuite class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 577 Creating the test case . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 578 Importing the model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 578 Preparing for JUnit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 578 Creating a test case . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 579 The setUp and tearDown methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 582 Test methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 582 Creating a TestSuite . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 584 Running the test case. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 586 Testing the Web applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 588 Contents xiii Component testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 588 Creating a Java test case . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 589 Preparing a Java test case . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 591 Updating code of Java test case . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 593 Running a Java test case . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 594 Report test case results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 595 Creating an HTTP test case . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 598 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 603 Part 4. Deploying and profiling applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 605 Chapter 18. Deploying enterprise applications . . . . . . . . . . . . . . . . . . . . 607 Enterprise application deployment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 608 Importing the enterprise application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 608 Working with deployment descriptors. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 608 EJB deployment descriptor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 609 Web deployment descriptor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 611 Application client module deployment descriptor . . . . . . . . . . . . . . . . . . . 613 Building an application client module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 614 Exporting an enterprise application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 616 Configuring WebSphere Application Server. . . . . . . . . . . . . . . . . . . . . . . . . . 617 Start the server and the administrative console . . . . . . . . . . . . . . . . . . . . 617 Configuring a server (optional) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 618 Configuring a JDBC driver and data source . . . . . . . . . . . . . . . . . . . . . . . 618 Save the configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 621 Installing an enterprise application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 622 Regenerating HTTP Server plug-in configuration . . . . . . . . . . . . . . . . . . . 627 Starting the enterprise application. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 627 Testing the applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 628 Remote debugging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 629 Command line tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 629 Batch commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 629 Scripting tool: wsadmin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 630 Classpath . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 632 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 632 Chapter 19. Building applications with Ant . . . . . . . . . . . . . . . . . . . . . . . 633 What is Ant?. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 634 Sample demo project and application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 635 Ant build files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 635 Ant tasks. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 636 Creating a simple build file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 636 Project definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 638 Global properties. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 639 xiv WebSphere Studio Application Developer Version 5 Programming Guide Build targets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 639 Running Ant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 641 Where is the output? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 643 Rerunning Ant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 643 Forced build . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 644 Classpath problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 644 Building J2EE applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 644 Using or importing a J2EE project. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 645 Ant J2EE build script . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 645 Running Ant for J2EE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 650 Building Javadoc with Ant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 651 Running Ant outside of Application Developer . . . . . . . . . . . . . . . . . . . . . . . . 652 Preparation of the command file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 652 Running the command file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 653 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 654 Chapter 20. Profiling applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 655 Profiling architecture. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 656 Profiling Java processes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 657 Agent Controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 657 Profiling an application in the WebSphere Test Environment . . . . . . . . . . 658 Attaching to a Java process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 658 Start monitoring. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 662 Performance analysis views . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 663 Launch Java process for profiling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 663 Profiling remote processes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 665 Performance analysis. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 666 Package statistics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 667 Class method statistics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 668 Method statistics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 669 Heap . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 670 Method invocation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 674 Method execution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 677 Execution flow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 679 Sequence diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 680 Instance statistics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 682 Object references . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 684 Some things to be aware of . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 685 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 685 Part 5. Team programming. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 687 Chapter 21. Version control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 689 Local history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 690 Contents xv Comparing files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 690 Replacing files. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 691 Restoring deleted files. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 692 Preferences. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 692 Team development. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 693 Repository . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 694 Application Developer team support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 698 Terminology comparison. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 699 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 700 Chapter 22. Using Concurrent Versions System . . . . . . . . . . . . . . . . . . . 701 Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 702 Installing CVS on the Windows platform . . . . . . . . . . . . . . . . . . . . . . . . . . . . 703 Creating a CVS repository on CVSNT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 703 Configuring CVS in Application Developer. . . . . . . . . . . . . . . . . . . . . . . . . . . 706 What is new in Application Developer Version 5?. . . . . . . . . . . . . . . . . . . 706 CVS preferences. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 707 What changes could impact your work? . . . . . . . . . . . . . . . . . . . . . . . . . . 710 Ignoring resources from version control . . . . . . . . . . . . . . . . . . . . . . . . . . 711 Label decorations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 712 CVS console . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 712 Development scenario . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 713 Creating and sharing the project (step 1 - stade1) . . . . . . . . . . . . . . . . . . 714 Adding a shared project to the workspace (step 2 - stade2). . . . . . . . . . . 719 Synchronizing with repository (step 3 - stade1) . . . . . . . . . . . . . . . . . . . . 722 Parallel development (step 4 - stade1 and stade2). . . . . . . . . . . . . . . . . . 723 Resolving conflicts (step 5 - stade1) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 724 Versioning (step 6 - stade1) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 730 CVS resource history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 731 Branches in CVS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 733 Branching . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 734 Merging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 736 Defining branch tag. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 739 Working with patches . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 740 Creating a patch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 740 Applying a patch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 742 Disconnecting a project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 745 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 746 Chapter 23. Using ClearCase . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 747 What is Rational ClearCase? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 748 Basic ClearCase terminology. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 749 Installing ClearCase LT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 749 xvi WebSphere Studio Application Developer Version 5 Programming Guide Installing ClearCase LT Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 750 Installing the ClearCase LT client . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 752 ClearCase integration with Application Developer . . . . . . . . . . . . . . . . . . . . . 752 ClearCase help in Application Developer . . . . . . . . . . . . . . . . . . . . . . . . . 753 ClearCase preferences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 753 Using ClearCase with Application Developer. . . . . . . . . . . . . . . . . . . . . . . . . 754 Setting up ClearCase for a new project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 756 Creating a new VOB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 756 Creating new ClearCase project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 757 Joining a ClearCase project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 759 Creating a Web project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 762 Adding a project to ClearCase source control. . . . . . . . . . . . . . . . . . . . . . 762 Development scenario . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 765 Developer 1 adds a servlet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 765 Developer 1 delivers work to the integration stream . . . . . . . . . . . . . . . . . 768 Developer 1 makes a baseline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 770 Developer 2 joins the project. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 772 Developer 2 imports projects into Application Developer . . . . . . . . . . . . . 774 Developer 2 adds a new servlet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 776 Developer 2 delivers work to the integration stream . . . . . . . . . . . . . . . . . 778 Developer 2 makes a new baseline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 779 Developers synchronize . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 779 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 782 Part 6. Appendixes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 783 Appendix A. Product installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 785 Installing DB2 UDB. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 786 Installing WebSphere Application Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . 786 Hardware prerequisites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 786 Software prerequisites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 786 Installation Application Server 5.0. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 787 Verifying the installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 789 Installing Application Developer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 790 Hardware prerequisites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 790 Software prerequisites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 790 Installing Application Developer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 791 Installing the Agent Controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 792 Update Application Developer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 793 Using the Update Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 793 Manual update . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 798 Appendix B. Keyboard shortcuts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 801 Workbench shortcuts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 802 Contents xvii Editing shortcuts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 802 Java editor shortcuts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 803 Java development tools shortcuts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 804 Debug perspective shortcuts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 805 Page and CSS Designer shortcuts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 805 Page Designer source page shortcuts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 807 Appendix C. Additional material . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 809 Locating the Web material . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 809 Using the Web material . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 810 System requirements for downloading the Web material . . . . . . . . . . . . . 810 How to use the Web material . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 810 Installing the EJBBANK database. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 811 Installing the ItsoProGuide.ear file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 812 Installing the server. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 814 Installing other projects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 814 DB2 user ID and password . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 814 Abbreviations and acronyms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 815 Related publications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 817 IBM Redbooks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 817 Other publications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 818 Online resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 818 How to get IBM Redbooks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 819 Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 821 xviii WebSphere Studio Application Developer Version 5 Programming Guide © Copyright IBM Corp. 2003. All rights reserved. xix 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. Any reference to an IBM product, program, or service is not intended to state or imply that only that IBM product, program, or service may be used. Any functionally equivalent product, program, or service that does not infringe any IBM intellectual property right may be used instead. However, it is the user's responsibility to evaluate and verify the operation of any non-IBM product, program, or service. IBM may have patents or pending patent applications covering subject matter described in this document. The furnishing of this document does not give you any license to these patents. You can send license inquiries, in writing, to: IBM Director of Licensing, IBM Corporation, North Castle Drive Armonk, NY 10504-1785 U.S.A. The following paragraph does not apply to the United Kingdom or any other country where such provisions are inconsistent with local law : INTERNATIONAL BUSINESS MACHINES CORPORATION PROVIDES THIS PUBLICATION "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Some states do not allow disclaimer of express or implied warranties in certain transactions, therefore, this statement may not apply to you. This information could include technical inaccuracies or typographical errors. Changes are periodically made to the information herein; these changes will be incorporated in new editions of the publication. IBM may make improvements and/or changes in the product(s) and/or the program(s) described in this publication at any time without notice. Any references in this information to non-IBM Web sites are provided for convenience only and do not in any manner serve as an endorsement of those Web sites. The materials at those Web sites are not part of the materials for this IBM product and use of those Web sites is at your own risk. IBM may use or distribute any of the information you supply in any way it believes appropriate without incurring any obligation to you. Information concerning non-IBM products was obtained from the suppliers of those products, their published announcements or other publicly available sources. IBM has not tested those products and cannot confirm the accuracy of performance, compatibility or any other claims related to non-IBM products. Questions on the capabilities of non-IBM products should be addressed to the suppliers of those products. This information contains examples of data and reports used in daily business operations. To illustrate them as completely as possible, the examples include the names of individuals, companies, brands, and products. All of these names are fictitious and any similarity to the names and addresses used by an actual business enterprise is entirely coincidental. COPYRIGHT LICENSE: This information contains sample application programs in source language, which illustrates programming techniques on various operating platforms. You may copy, modify, and distribute these sample programs in any form without payment to IBM, for the purposes of developing, using, marketing or distributing application programs conforming to the application programming interface for the operating platform for which the sample programs are written. These examples have not been thoroughly tested under all conditions. IBM, therefore, cannot guarantee or imply reliability, serviceability, or function of these programs. You may copy, modify, and distribute these sample programs in any form without payment to IBM for the purposes of developing, using, marketing, or distributing application programs conforming to IBM's application programming interfaces. . . . . 54 4 Server page. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 4 xii WebSphere Studio Application Developer Version 5 Programming Guide Configuration. . . . . . . . . . . . . . . . . . . . . . . . 821 xviii WebSphere Studio Application Developer Version 5 Programming Guide © Copyright IBM Corp. 20 03. All rights reserved. xix Notices This information. 7 52 ClearCase integration with Application Developer . . . . . . . . . . . . . . . . . . . . . 7 52 ClearCase help in Application Developer . . . . . . . . . . . . . . . . . . . . . . . . . 753 ClearCase

Ngày đăng: 03/07/2014, 20:20

Tài liệu cùng người dùng

  • Đang cập nhật ...

Tài liệu liên quan