ebook img

Patterns PDF

410 Pages·2005·3.4 MB·English
by  
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview Patterns

Front cover Patterns: SOA with an Enterprise Service Bus in WebSphere Application Server V6 Design and implement an ESB using WebSphere V6 technologies Service-oriented architecture and Web services Learn by example with practical scenarios Martin Keen Oscar Adinolfi Sarah Hemmings Andrew Humphreys Hanumanth Kanthi Alasdair Nottingham ibm.com/redbooks International Technical Support Organization Patterns: SOA with an Enterprise Service Bus in WebSphere Application Server V6 May 2005 SG24-6494-00 Note: Before using this information and the product it supports, read the information in “Notices” on pageix. First Edition (May 2005) This edition applies to Version 6 of WebSphere Application Server and Rational Application Developer. © Copyright International Business Machines Corporation 2005. All rights reserved. Note to U.S. Government Users Restricted Rights -- Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp. Contents Notices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .ix Trademarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . x Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .xi How to read this redbook. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .xi The team that wrote this redbook. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .xiv Become a published author . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .xvi Comments welcome. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvii Part 1. Patterns for e-business and SOA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 Chapter 1. Introduction to Patterns for e-business . . . . . . . . . . . . . . . . . . . 3 1.1 The Patterns for e-business layered asset model. . . . . . . . . . . . . . . . . . . . 4 1.2 How to use the Patterns for e-business . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 1.2.1 Selecting a Business, Integration, or Composite pattern, or a Custom design. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 1.2.2 Selecting Application patterns. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 1.2.3 Review Runtime patterns . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 1.2.4 Reviewing Product mappings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 1.2.5 Reviewing guidelines and related links. . . . . . . . . . . . . . . . . . . . . . . 16 1.3 Summary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 Chapter 2. SOA and the Enterprise Service Bus . . . . . . . . . . . . . . . . . . . . 19 2.1 Overview of SOA. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 2.1.1 Definition of a service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 2.1.2 Web services and SOA. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 2.1.3 The advantages of SOA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 2.1.4 SOA summary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 2.2 Overview of Enterprise Service Bus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 2.2.1 SOA infrastructure requirements. . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 2.2.2 Definition of an ESB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 2.2.3 Enterprise requirements for an ESB. . . . . . . . . . . . . . . . . . . . . . . . . 34 2.2.4 Minimum ESB capabilities. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 2.2.5 ESB and Web services technologies . . . . . . . . . . . . . . . . . . . . . . . . 38 2.2.6 Extended ESB capabilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 2.2.7 The ESB and other SOA components . . . . . . . . . . . . . . . . . . . . . . . 44 Chapter 3. Application Integration and Extended Enterprise patterns . . 45 3.1 Application Integration pattern. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 © Copyright IBM Corp. 2005. All rights reserved. iii 3.1.1 Direct Connection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 3.1.2 Direct Connection=Message Connection variation. . . . . . . . . . . . . . 49 3.1.3 Direct Connection=Call Connection variation . . . . . . . . . . . . . . . . . . 50 3.1.4 Broker . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 3.1.5 Broker=Router variation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 3.1.6 Serial Process. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 3.1.7 Serial Process=Workflow variation . . . . . . . . . . . . . . . . . . . . . . . . . . 55 3.1.8 Parallel Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 3.1.9 Parallel Process=Workflow variation. . . . . . . . . . . . . . . . . . . . . . . . . 58 3.2 Extended Enterprise pattern . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 3.2.1 Exposed Direct Connection. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 3.2.2 Exposed Direct Connection=Message Connection variation . . . . . . 62 3.2.3 Exposed Direct Connection=Call Connection variation. . . . . . . . . . . 63 3.2.4 Exposed Broker. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64 3.2.5 Exposed Broker=Router variation. . . . . . . . . . . . . . . . . . . . . . . . . . . 65 3.2.6 Exposed Serial Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67 3.2.7 Exposed Serial Process=Workflow variation. . . . . . . . . . . . . . . . . . . 68 Chapter 4. Product descriptions and ESB capabilities . . . . . . . . . . . . . . . 71 4.1 Runtime product descriptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72 4.1.1 IBM WebSphere Application Server V6 . . . . . . . . . . . . . . . . . . . . . . 72 4.1.2 IBM DB2 Universal Database Enterprise Server Edition V8.2 . . . . . 76 4.1.3 IBM Cloudscape . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76 4.1.4 IBM WebSphere MQ V5.3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77 4.1.5 IBM WebSphere Business Integration Message Broker V5 . . . . . . . 78 4.1.6 IBM WebSphere Business Integration Server Foundation V5.1. . . . 79 4.2 Development product descriptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80 4.2.1 IBM Rational Application Developer V6 . . . . . . . . . . . . . . . . . . . . . . 80 4.3 Product capabilities for the Enterprise Service Bus . . . . . . . . . . . . . . . . . 81 4.3.1 Assessment of ESB capabilities by product . . . . . . . . . . . . . . . . . . . 82 4.3.2 IIBM WebSphere Application Server V6. . . . . . . . . . . . . . . . . . . . . . 83 4.3.3 IBM WebSphere Business Integration Message Broker V5 . . . . . . . 87 4.3.4 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91 Chapter 5. SOA runtime patterns and Product mappings. . . . . . . . . . . . . 95 5.1 Runtime patterns. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96 5.1.1 Direct Connection using a service bus . . . . . . . . . . . . . . . . . . . . . . . 96 5.1.2 ESB runtime pattern . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98 5.1.3 ESB Gateway runtime pattern. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106 5.1.4 BSC runtime pattern . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108 5.1.5 ESB, BSC composite pattern . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111 5.1.6 Exposed ESB Gateway runtime pattern . . . . . . . . . . . . . . . . . . . . . 113 5.1.7 Exposed ESB Gateway, BSC composite pattern . . . . . . . . . . . . . . 115 iv Patterns: SOA with an Enterprise Service Bus in WebSphere Application Server V6 5.2 Product mappings. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116 5.2.1 ESB runtime pattern::Product mappings. . . . . . . . . . . . . . . . . . . . . 117 5.2.2 ESB Gateway runtime pattern::Product mapping. . . . . . . . . . . . . . 118 5.2.3 BSC runtime pattern::Product mapping . . . . . . . . . . . . . . . . . . . . . 119 5.2.4 Exposed ESB Gateway Product mapping. . . . . . . . . . . . . . . . . . . . 120 Part 2. Business scenario and guidelines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123 Chapter 6. The business scenario that this book uses. . . . . . . . . . . . . . 125 6.1 WS-I sample application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126 6.2 Stages of the business scenario. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126 6.2.1 Stage 1: Internal supply chain management on demand . . . . . . . . 126 6.2.2 Stage 2: Additional warehouses . . . . . . . . . . . . . . . . . . . . . . . . . . . 128 6.2.3 Stage 3: Divested inter-enterprise manufacturers. . . . . . . . . . . . . . 129 Chapter 7. Technology options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131 7.1 Web services. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132 7.1.1 Web services interoperability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135 7.1.2 Advanced and future Web services standards . . . . . . . . . . . . . . . . 137 7.2 Java Message Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141 7.2.1 Understanding messaging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141 7.2.2 JMS messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142 7.2.3 Advantages of JMS. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143 7.2.4 Disadvantages of JMS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143 7.3 J2EE Connector Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144 7.3.1 Advantages of the J2EE Connector Architecture . . . . . . . . . . . . . . 144 7.3.2 Disadvantages of the J2EE Connector Architecture. . . . . . . . . . . . 145 7.4 Service integration bus in WebSphere Application Server . . . . . . . . . . . 145 7.4.1 Concepts and architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145 7.4.2 Further information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149 Part 3. Scenario implementation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151 Chapter 8. SOA Direct Connection pattern. . . . . . . . . . . . . . . . . . . . . . . . 153 8.1 Design guidelines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154 8.1.1 Business scenario. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154 8.1.2 Selecting an SOA pattern . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155 8.1.3 Products . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156 8.2 Development guidelines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157 8.2.1 Scenario implementation: Direct Connection interaction . . . . . . . . 157 8.3 Runtime guidelines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160 8.3.1 Using the service integration bus for messaging . . . . . . . . . . . . . . 160 8.3.2 Creating a bus. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162 8.3.3 Adding a bus member. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163 Contents v 8.3.4 Creating the destinations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164 8.3.5 Creating a JMS connection factory. . . . . . . . . . . . . . . . . . . . . . . . . 165 8.3.6 Creating the JMS queues . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167 8.3.7 Creating the JMS activation specifications . . . . . . . . . . . . . . . . . . . 169 8.3.8 Hosting the WSDL files. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171 8.3.9 Installing the applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172 8.3.10 Running and using the sample application. . . . . . . . . . . . . . . . . . 174 Chapter 9. Enterprise Service Bus pattern: router scenario. . . . . . . . . . 179 9.1 Design guidelines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180 9.1.1 Business scenario. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180 9.1.2 Selecting an SOA pattern . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182 9.1.3 Router interaction design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184 9.1.4 Products . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200 9.2 Development guidelines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202 9.2.1 Scenario implementation: ESB router interaction. . . . . . . . . . . . . . 203 9.2.2 Creating a SOAP over JMS Web service . . . . . . . . . . . . . . . . . . . . 205 9.2.3 Updating Web service clients to use the ESB. . . . . . . . . . . . . . . . . 219 9.3 Runtime guidelines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231 9.3.1 Using the service integration bus to route Web service requests. . 233 9.3.2 Removing the existing enterprise applications . . . . . . . . . . . . . . . . 236 9.3.3 Installing the SDO repository . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237 9.3.4 Installing the Web services support . . . . . . . . . . . . . . . . . . . . . . . . 238 9.3.5 Creating the endpoint listeners. . . . . . . . . . . . . . . . . . . . . . . . . . . . 241 9.3.6 Creating the JMS resources for the Retailer Web service . . . . . . . 243 9.3.7 Creating the outbound services . . . . . . . . . . . . . . . . . . . . . . . . . . . 244 9.3.8 Creating the inbound services. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 247 9.3.9 Exporting the service integration bus WSDL for development . . . . 253 9.3.10 Importing the schemas into the SDO repository. . . . . . . . . . . . . . 254 9.3.11 Installing and testing the new enterprise applications. . . . . . . . . . 255 9.3.12 Runtime alternatives. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 256 Chapter 10. Enterprise Service Bus pattern: broker scenario . . . . . . . . 259 10.1 Design guidelines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 260 10.1.1 Business scenario. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 260 10.1.2 Selecting an SOA pattern . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 262 10.1.3 Broker interaction design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264 10.1.4 Products . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271 10.2 Development guidelines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274 10.2.1 Scenario implementation: ESB broker interaction. . . . . . . . . . . . . 274 10.2.2 Mediations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275 10.2.3 Creating a mediation handler class. . . . . . . . . . . . . . . . . . . . . . . . 276 10.2.4 Working with messages in mediations . . . . . . . . . . . . . . . . . . . . . 279 vi Patterns: SOA with an Enterprise Service Bus in WebSphere Application Server V6 10.2.5 Coding the mediations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 282 10.2.6 Assigning and exporting the mediation handlers . . . . . . . . . . . . . 295 10.3 Runtime guidelines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 297 10.3.1 Externalizing service lookup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 298 10.3.2 Configuration of additional resources . . . . . . . . . . . . . . . . . . . . . . 304 10.3.3 Mediation configuration. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 305 10.3.4 Installing the additional Warehouses . . . . . . . . . . . . . . . . . . . . . . 311 10.3.5 Testing the sample application . . . . . . . . . . . . . . . . . . . . . . . . . . . 311 Chapter 11. Exposed ESB Gateway pattern . . . . . . . . . . . . . . . . . . . . . . . 315 11.1 Design guidelines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 316 11.1.1 Business scenario. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 316 11.1.2 Selecting an SOA pattern . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 317 11.1.3 Exposed ESB Gateway design. . . . . . . . . . . . . . . . . . . . . . . . . . . 321 11.1.4 Products . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 333 11.2 Development guidelines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 335 11.3 Runtime guidelines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 337 11.3.1 Removing Web services from the ESB. . . . . . . . . . . . . . . . . . . . . 338 11.3.2 Migrating the SDO repository to use Network Cloudscape. . . . . . 342 11.3.3 Setting up the Exposed Gateway . . . . . . . . . . . . . . . . . . . . . . . . . 349 11.3.4 Configuring the service integration bus link . . . . . . . . . . . . . . . . . 354 11.3.5 Routing Web service requests between buses. . . . . . . . . . . . . . . 357 11.3.6 Testing the sample application . . . . . . . . . . . . . . . . . . . . . . . . . . . 361 Part 4. Appendixes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 363 Appendix A. Additional material . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 365 Locating the Web material . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 365 Using the Web material . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 366 System requirements for downloading the Web material . . . . . . . . . . . . . 366 How to use the Web material . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 366 Appendix B. Configuring the scenario environment. . . . . . . . . . . . . . . . 367 Working with the WS-I sample scenario enterprise applications . . . . . . . . . . 368 Configuring the Direct Connection scenario. . . . . . . . . . . . . . . . . . . . . . . . . . 368 Configuring the ESB router scenario . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 370 Abbreviations and acronyms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 373 Related publications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 375 IBM Redbooks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 375 Other publications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 375 Online resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 376 How to get IBM Redbooks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 378 Contents vii Help from IBM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 378 Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 379 viii Patterns: SOA with an Enterprise Service Bus in WebSphere Application Server V6

Description:
4.1.6 IBM WebSphere Business Integration Server Foundation V5.1 79 .. System requirements for downloading the Web material . 366 . This IBM Redbook focuses on how you can use the service-oriented . Figure 1 Left to right: Sarah, Oscar, Andy, Kanthi, Martin, and Alasdair.
See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.