Foreword xixCHAPTER 1: Introduction 1 1.1 About This Book 2Objectives of This Book 2Who This Book Is For 2What This Book Does Not Cover 31.2 Prerequisite Reading 3How This Book Is Organized 41.3 How Principles and Patterns Are Used in This Book 71.4 Symbols and Figures 71.5 Additional Information 7Updates, Errata, and Resources (www.servicetechbooks.com) 8Referenced Specifications (www.
servicetechspecs.com) 8The Service Technology Magazine (www.servicetechmag.com) 8Service-Orientation (www.serviceorientation.com) 8What Is REST? (www.whatisrest.com) 8What Is Cloud? (www.
whatiscloud.com) 8SOA and Cloud Computing Design Patterns (www.soapatterns.org, www.cloudpatterns.org) 8SOA Certified (SOACP) Professional (www.soaschool.com) 9Cloud Certified Professional (CCP) (www.
cloudschool.com) 9Big Data Science Certified Professional (BDSCP) (www.bigdatascienceschool.com) 9Notification Service 9 CHAPTER 2: Case Study Examples 11 2.1 How Case Study Examples Are Used 12Style Characteristics 12Relationship to Abstract Content 12Code Samples 122.2 Case Study Background: NovoBank 13Technical Infrastructure 13Automation Solutions 13Business Obstacles and Goals 14Future IT Roadmap 151. Build Reusable Business Services 152. Consolidate Information 163.
Improve Channel Experience 164. Build Services Infrastructure 162.3 Case Study Background: SmartCredit Co 16Technical Infrastructure 17Automation Solutions 17Business Goals 17Future IT Roadmap 18 PART I: FUNDAMENTALSCHAPTER 3: Fundamental SOA Concepts 21 3.1 Basic Terminology and Concepts 22Service-Oriented Computing 22Service-Orientation 24Service-Oriented Architecture (SOA) 27SOA Manifesto 28Services 29Cloud Computing 29IT Resources 30Service Models 30Agnostic Logic and Non-Agnostic Logic 31Service Inventory 32Service Portfolio 32Service Candidate 33Service Contract 33Service-Related Granularity 34Service Profiles 35SOA Design Patterns 363.2 Further Reading 38 CHAPTER 4: Basic Java Distributed Technologies 39 4.1 Java Distributed Computing Basics 40Java SE Architecture 41Java EE Architecture 41The Beginning of Java EE 41Application Packaging and Deployment 44Deployment Descriptors 44Java EE Architectural Tiers 454.2 Java Distributed Technologies and APIs 46Java SE APIs 46RMI 46RMI / IIOP 47JNDI 48JDBC 49Java EE APIs 49Contexts and Dependency Injection 49JTA 50Java EE Connector Architecture 51EJB 51Session EJBs 52Persistence Entities 53Service-Orientation Principles and the EJB Model 55JMS 56Message-Driven Beans 58Security in Java EE 584.3 XML Standards and Java APIs 59XML 59XML Schema Definition 61XSLT 63JAXP 63JAXB 644.
4 Building Services with Java Components 64Components as Services 65Application Protocols 65Service Contracts 68Location 68Operations 69Messages 69Further Considerations 70Components as Services and Service-Orientation 71Standardized Service Contract 71Service Loose Coupling 71Service Abstraction 72Service Discoverability 724.5 Java Vendor Platforms 74GlassFish Enterprise Server 74IBM WebSphere Application Server 75IBM WebSphere Application Server Community Edition 78Oracle WebLogic Server 79 CHAPTER 5: Web-Based Service Technologies 81 5.1 SOAP-Based Web Services 82Extensibility of Web Services Standards (WS-*) 88WS-Addressing 89SOAP with Attachments (SwA) 90WS-ReliableMessaging 91WS-Transaction 92WS-Security 93WS-Policy 94Web Services Distributed Management 95Common Web Services Middleware 95Enterprise Service Bus (ESB) 95Orchestration 97Management and Monitoring 99Registries and Repositories 99Service Construction and Assembly 1005.2 REST Services 101HTTP Response Codes 102Resources and Addresses 103Service Request 104Service Response 104Service Request 104Service Response 104HTTP Methods 106Resource Representations 108The ACCEPT Header 109 CHAPTER 6: Building Web-Based Services with Java 111 6.1 JAX-WS 112SAAJ 115Handlers 118Web Services Engines and Toolkits 119JAXR 1206.2 Java Implementations of WS-* Standards 122Advanced Web Services Standards and Frameworks 122Service Component Architecture 123Spring-WS 1246.3 JAX-RS 124Implementing JAX-RS 125Implementing REST Services 129Scalability 130Statelessness 131Uniform Contract 131Cacheability 131Addressability 132Security 132REST Service Support 134 PART II: SERVICESCHAPTER 7: Service-Orientation Principles with Java Web-Based Services 139 7.1 Service Reusability 140Agnostic Functional Contexts 140Highly Generic Service Logic 141Generic and Extensible Service Contracts 144Concurrent Access to Service Logic 1457.
2 Standardized Service Contract 151Top-Down vs. Bottom-Up 151Mapping Between Java and WSDL 152Wrapped Document/Literal Contracts 153Implicit and Explicit Headers 154Explicit Headers 154Implicit Headers 157No Headers 159Data Mapping with REST 159Conversion Between JSON and POJOs 161Binary Data in Web Services 165Binary Data in REST Services 170Use of Industry Standards 1757.3 Service Loose Coupling 176Separation of Contract and Implementation 177Independent Functional Contexts 179Service Consumer Coupling 1807.4 Service Abstraction 184Abstracting Technology Details 185Hiding Service Details 185Document Constraints 1887.5 Service Composability 189Runtime Environment Efficiency 190Service Contract Flexibility 192Standards-Based Runtime 1937.6 Service Autonomy 194Well-Defined Functional Boundary 194Runtime Environment Control 195High Concurrency 1967.7 Service Statelessness 197Orchestration Infrastructure 198Session State 198Storing State 1997.8 Service Discoverability 204Design-Time Discoverability 204Runtime Discoverability 205Service Registries 208 CHAPTER 8: Utility Services with Java 211 8.
1 Inside the Java Utility Service 212Architectural Considerations 212Utility Service Taxonomy 2208.2 Utility Service Design and Implementation 221Utility Service Design 221Utility Services and Java Editions 226Utility Services in Java SE 226Utility Services in Java EE 227Utility Services and Open-Source Frameworks 229Spring Framework 229Transaction Management 229Data Access Objects 230Object-Relational Mapping 230JMS 230JMX 230JCA 231Spring MVC 231Hibernate 231Commons Logging and Log4J 231Utility Services as Web-Based Services 231Sending XML Data as a String 232Utilizing 233Provider-Style Web Service Logic in JAX-WS 234Building REST Utility Services 236Testing Considerations 238Packaging Considerations 2398.3 Utility Service Types 240Omni Utility Services 240Design Considerations 241Service Implementation 241Service Consumption 241Resource Utility Services 248Persistence/Data Access Resources 248Messaging Resources 248Transaction Resources 249Design Considerations 249Service Implementation 251Service Consumption 251Micro-Utility Services 253Design Considerations 253Service Implementation 253Service Consumption 254Wrapper Utility Services 257Design Considerations 258Service Implementation 259Service Consumption 259 CHAPTER 9: Entity Services with Java 261 9.1 Inside the Java Entity Service 262Architectural Considerations 263Domain Entities vs. Message Entities 265Data Aggregation 266Data Access Modes 267Change Notifications 2689.2 Java Entity Service Design and Implementation 270Entity Service Design 270Designing Domain Entities and Message Entities 271Designing Stateless Entity Services 272Designing Business-Relevant Entity Services 273Designing Generic Entity Services 273Designing Aggregating Entity Services 275Entity Service Implementation 278Java Editions 278Entity Services as Web-Based Services 282Entity Web Services Using SOAP 283REST Entity Services 291Read-Only and Read-Write Resources 292Resource Granularity 292Resource Creation and Location 292Request Message 292Response Message 293Resource Relationships 294Request Message 294Response Message 294Request Message 295Resource Collections 295Request Message 295Response Message 295Aggregate Entities 297Request Message 298Response Message 298Open-Source Frameworks 302Testing Considerations 302Java Packaging Considerations 303 PART III: SERVICE COMPOSITION AND INFRASTRUCTURECHAPTER 10: Task Services with Java 307 10.1 Inside a Task Service 308Performance Considerations 31510.2 Building Task Services 316Implementation Considerations 316Web-Based Task Services 320Task Services with SOAP and WSDL 320Task Services with REST 324Testing Considerations 332Packaging Considerations 334 CHAPTER 11: Service Composition with Java 335 11.
1 Inside Service Compositions 336Service Composition Roles 336Compositions and MEPs 337Synchronous and Asynchronous Invocation 338Service Level Agreements (SLAs) 33911.2 Java Service Composition Design and Implementation 340Composition Logic: Coding vs. Orchestration 340REST Service Composition Considerations 341Composition Member Endpoints 344Error Handling 345Schema Type Reuse 353Web-Based Services vs. Java Components 359Packaging, Testing and Deploying Composed Services 36211.3 Service and Service Composition Performance Guidelines 368Measuring Performance 368Testing Performance 370Caching 371Data Grids 371REST Caching 372Scaling Out Services with State 374Handling Failures 375Parsing and Marshaling 376 CHAPTER 12: ESB as SOA Infrastructure 379 12.1 Basic Traditional Messaging Frameworks 380RPC vs. Messaging 381Technology Coupling 82Spatial Coupling 382Temporal Coupling 382Message Producers and Message Consumers 38512.2 Basic Service Messaging Frameworks 389Basic Service Message Processing without ESBs 389Message Routing without an ESB 390Message Transformation without an ESB 391Basic Service Message Processing with ESBs 392Message Routing with an ESB 392Message Transformation with an ESB 39212.
3 Common ESB Features Relevant to SOA 397Service Lookup and Invocation 397Service Processing 399Service Composition Support 401REST API Management Support 402 PART IV: APPENDICESAPPENDIX A: Case Study Conclusion 405 A.1 NovoBank 406A.2 SmartCredit Co. 407 APPENDIX B: Service-Orientation Principles Reference 409APPENDIX C: SOA Design Patterns Reference 425APPENDIX D: The Annotated SOA Ma.